TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Deploy your side-projects at scale for basically nothing – Google Cloud Run

722 pointsby alex-olivierover 5 years ago

53 comments

franciscopover 5 years ago
I have used it for work-related reasons and indeed the service is quite nice. But I don&#x27;t use Google Cloud Run for personal projects for two reasons:<p>- No way of limiting the expenses AFAIK. I don&#x27;t want the possibility of having a huge bill on my name that I cannot pay. This unfortunately applies to other clouds.<p>- The risk of being locked out. For many, many reasons (including the above), you can get locked out of the whole ecosystem. I depend on Google for both Gmail and Android, so being locked out would be a disaster. To use Google Cloud, I&#x27;d basically need to migrate out of Google in other places, which is a huge initial cost.<p>Both of those are basically risks. I&#x27;d much rather overpay $20-50&#x2F;month than having a small risk of having to pay $100k or being locked out of Gmail&#x2F;my phone. I <i>cannot</i> have a $100k bill to pay, it&#x27;d destroy everything I have.<p>Also I haven&#x27;t needed it so far. I&#x27;ve had a Node.js project on the front page of HN, with 100k+ visits, and the Heroku hobby server used 30% of the CPU with peaks at 50%. Trying to do the software decently does pay off.
评论 #22028990 未加载
评论 #22029494 未加载
评论 #22030509 未加载
评论 #22028593 未加载
评论 #22028700 未加载
评论 #22029222 未加载
评论 #22030325 未加载
评论 #22028712 未加载
评论 #22028555 未加载
评论 #22028957 未加载
评论 #22032259 未加载
评论 #22036979 未加载
评论 #22031531 未加载
评论 #22032142 未加载
评论 #22032098 未加载
评论 #22028688 未加载
评论 #22028470 未加载
评论 #22032147 未加载
评论 #22037798 未加载
评论 #22029411 未加载
评论 #22030784 未加载
alasdair_over 5 years ago
I wont use this for the simple reason that I bought into the Google Appengine stack in the past and it really bit me for several reasons:<p>They force-upgraded the java version. The problem was their their own libraries didn’t work with the new version and we had to rewrite a ton of code.<p>It ended up being insanely expensive at scale.<p>We were totally locked-in to their system and the way it did things. This would be fine but they would also deprecate certain things we relied upon fairly regularly so there was regular churn to keep the system running.<p>Support was extremely weak for some parts of the system. Docs for java were outdated compared with the python docs.<p>Support (that we paid for) literally said to us “oh... you’re still using appengine?”<p>Finally, they can jack up the pricing at any time and there really isn’t anything you can do - you can’t switch to an alternative appengine provider.<p>Certain pages in the management console were completely broken due to a js error (on any browser). In order to Use them i had to manually patch the javascript. Six months after reporting it several times and it was still broken.<p>Oh, and when we got featured on a bunch of news sites, our “scalable” site hit the billing threshold and stopped working. No problem, just update the threshold, right? Except it takes twenty four hours (!) for the billing stats to actually update. So were were down on the one day that “unlimited scaling” actually mattered to us.<p>I’m never again choosing a single-vendor lock-in solution. Especially since it’s not limited to appengine - Google once raised the fees for the maps API from thousands a year to eight figures (seriously) a year with barely any notice.
评论 #22029536 未加载
评论 #22029022 未加载
评论 #22029261 未加载
评论 #22032308 未加载
评论 #22031623 未加载
mokslyover 5 years ago
The thing I really want out of these services is the ability to set a payment cap. It’s probably never going to be an issue, but I have anxiety, and I can’t sleep easily knowing that if I fuck up, if someone sinister abuses my application or whatever I may be stuck with a giant bill.
评论 #22027927 未加载
评论 #22028193 未加载
评论 #22028034 未加载
评论 #22027921 未加载
评论 #22028391 未加载
评论 #22032703 未加载
评论 #22028520 未加载
评论 #22027984 未加载
评论 #22028839 未加载
评论 #22027940 未加载
评论 #22028374 未加载
评论 #22028406 未加载
评论 #22028029 未加载
minimaxirover 5 years ago
I&#x27;ve been using Cloud Run for my GPT-2 text generation apps (<a href="https:&#x2F;&#x2F;github.com&#x2F;minimaxir&#x2F;gpt-2-cloud-run" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;minimaxir&#x2F;gpt-2-cloud-run</a>) in order to survive random burst, and also for small Twitter bots (<a href="https:&#x2F;&#x2F;github.com&#x2F;minimaxir&#x2F;twitter-cloud-run&#x2F;tree&#x2F;master&#x2F;human-curated" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;minimaxir&#x2F;twitter-cloud-run&#x2F;tree&#x2F;master&#x2F;h...</a>) which can be invoked via Cloud Scheduler to utilize the efficiency benefits. It has been successful in those tasks.<p>The only complaint I have with Cloud Run now (after many usability updates since the initial release) is that there is no IP rate-limiting to prevent abuse, which has been the primary cause of unexpected costs. (due to how Cloud Run works, IP rate-limiting has to be on Google&#x27;s end; implementing it on your end via a proxy eliminates the ease-of-use benefits)
评论 #22028186 未加载
评论 #22028127 未加载
acvnyover 5 years ago
Can&#x27;t you see this article is a paid advertisement for Google Cloud? Just like those 1 hour long videos on youtube - where they show how pilots fly an airplane of a specific company and how well is al organized or a 1 hour long video of a german car factory.<p>Just reading this line makes you suspicious: &quot;I have built hundreds of side projects over the years &quot;<p>really? Hundreds?<p>And then below:<p>&quot;I am yet to have a side project go ‘viral’&quot;<p>Out of hundreds of projects over the years, none of them went viral?<p>And if you look at his &quot;blog&quot; you will see it has 3 entries in total: <a href="https:&#x2F;&#x2F;alexolivier.me&#x2F;" rel="nofollow">https:&#x2F;&#x2F;alexolivier.me&#x2F;</a>
评论 #22032045 未加载
评论 #22032321 未加载
评论 #22030671 未加载
jjeaffover 5 years ago
This article fails to mention the issue of needing a database. It doesn&#x27;t matter how seamlessly your application can scale if your data backend won&#x27;t scale with it.<p>They mention Cloud SQL, which is of course instance based and would run into scaling issues if your app got suddenly hammered. Not to mention, the cost isn&#x27;t $0 if your app gets 0 traffic, you are going to have to pay to keep that running around the clock.<p>I realize some applications are very heavy on the app side and light on needing to hit the DB, but in my experience, that isn&#x27;t very common.
评论 #22029078 未加载
评论 #22033201 未加载
评论 #22028938 未加载
duxupover 5 years ago
As a noob I have a question as to what advantages I have using docker compared to just a service like Heroku where I just push the application to them... and I don&#x27;t bother with docker?<p>To me with my limited understanding this seems like just another step.<p>Now granted when it comes to work, I&#x27;m using docker with specifics that I know why I would want &#x2F; can specify with docker ... but for personal projects this ever comes up for me.<p>But otherwise for personal projects it just never comes up.<p>Yet on the other hand when it comes to various examples I see more and more that involve docker where, I&#x27;m not sure it needs to &#x2F; what the advantage is.<p>Obviously there must be some strategic choices &#x2F; advantages I&#x27;m missing.
评论 #22028779 未加载
评论 #22033544 未加载
评论 #22028884 未加载
评论 #22031030 未加载
Dolores12over 5 years ago
Your liability is not capped anywhere. I better stick to 5$&#x2F;mo DO for my side-projects.
评论 #22029136 未加载
评论 #22028692 未加载
评论 #22028393 未加载
评论 #22028398 未加载
Havocover 5 years ago
Interesting. I&#x27;ve been looking looking at options too &amp; opted for essentially the opposite: Get a big(ish) VPS and stack everything on top of each other with docker behind a nginx reverse proxy.<p>So far so good. Managed to host gitlab, prometheus, grafana and ghost working this weekend, which I&#x27;m pretty chuffed about.<p>Not as clean as OP&#x27;s, but the intention was learning, so sacrifices on convenience are acceptable.
评论 #22032333 未加载
all_factzover 5 years ago
What’s the advantage of GCR over AWS Fargate&#x2F;ECS? I’ve been running an app on ECS for a couple months now and have been pretty happy with the ease of set-up, load-balancing, auto-scaling etc, though there are still kinks I’m figuring out (SSHing into containers to perform database management, for example, or deploying updated tasks without downtime). Is the main selling point of GCR just its price? I haven’t found ECS pricing to be an issue (but I’m also not running anything at scale, and I do pay more than a few cents a month — but still under 10 bucks).
评论 #22028506 未加载
评论 #22028059 未加载
评论 #22028099 未加载
aamederenover 5 years ago
AFAIK, PaaS solutions like heroku have a similar way of working, at least for side-projects. Here, you deploy a container and Google runs it somewhere and Heroku containerizes your application every time you push it. Similar to here, Heroku&#x27;s free hobby containers also go to sleep in ~30min inactivity.
评论 #22029151 未加载
评论 #22030403 未加载
ealexhudsonover 5 years ago
This is exactly the service that Azure needs and doesn&#x27;t seem to have: while there is a consumption plan for functions, that&#x27;s about it, and App Service is incredibly expensive for what you get.
评论 #22030135 未加载
评论 #22028487 未加载
f311aover 5 years ago
If very few people visit a side-project, that&#x27;s probably bad for Google search. Its crawler will be detecting slow response times and Google can penalize you in search results.
评论 #22028401 未加载
navdover 5 years ago
Cloud run is what zeit now was before it moved to v2. <a href="https:&#x2F;&#x2F;zeit.co&#x2F;" rel="nofollow">https:&#x2F;&#x2F;zeit.co&#x2F;</a>
评论 #22029034 未加载
darklajidover 5 years ago
I was tinkering with it recently. My problem was .. support.<p>After a lot of double-checking on my part, I was finally convinced that Cloud Run messed things up (in my case: A Content-Type header was changed from ThingsISend to text&#x2F;html and broke every client). The issue tracker is hard to find and more or less abandoned, SO wasn&#x27;t helpful (but had people that .. love Google Cloud Run and didn&#x27;t believe me) and only after tweeting a bit someone looked into it.<p>The issue is fixed now, which is nice. The way to get there was ... questionable?
tomlongover 5 years ago
Excuse my ignorance. if a container hasn&#x27;t been hit in a long time, how long does it take to serve the first request back? Is it spun up or sort of hot paused?
评论 #22027933 未加载
评论 #22028028 未加载
评论 #22027947 未加载
cutlerover 5 years ago
For personal projects and client work I prefer a VPS with fixed pricing. Many have quoted Digital Ocean on this thread but you get much more for your money with a VPS from Hetzner.com. $11.75&#x2F;month = 8Gb RAM, 2 CPUs, 80Gb SSD and 20Tb of traffic. That&#x27;s 4 times the RAM, 2 times the CPU and 10 times the traffic compared with a $10 Digital Ocean VPS.
评论 #22032501 未加载
hardwaresoftonover 5 years ago
Do the kind of people who have tech jobs and have side projects really need it to cost nothing to run side projects?<p>I don&#x27;t understand this obsession with running projects for &quot;nothing&quot; and contorting software architecture to do so.<p>$5&#x2F;mo for a digital ocean droplet or $50&#x2F;month for a a beefier VPS (or even dedicated hardware if you know where to look[0]) is not much compared to the normal monthly expenditure of people in tech on average.<p>If it was all for convenience&#x2F;efficiency that&#x27;d be one thing, but learning &quot;google cloud run&quot; teaches you nothing about system maintenance, limits your understanding of the full stack, and encourages a myopic view of development, all so at some point when Google&#x2F;AWS&#x2F;Azure raises the temperature of the water in the pot everyone starts wondering &quot;how did running software get so expensive?&quot;.
评论 #22031790 未加载
评论 #22032840 未加载
GordonSover 5 years ago
Sounds quite similar to Azure Container Instances, except ACI seems to be cheaper (at a glance). ACI is also not HTTP-only like this seems to be, but you do need to combine it with a Function App (Azure&#x27;s serverless offering) if you want to trigger containers using HTTP.
cocoflunchyover 5 years ago
We evaluated using it at work to replace App Engine Flex and unfortunately it was not ready for our use case: 1. There is no liveness&#x2F;readiness check nor a way to move the traffic between versions, so you&#x27;ll have downtime at every deployment 2. The only way to rollback to a previous version is to redeploy, no support from the web interface 3. There is no way to SSH to an instance (not so important) 4. You can&#x27;t connect to Google Cloud MemoryStore (hosted redis)<p>Scale to zero + instant deploys would make cloud run a great candidate for staging environments deployed on every pull request but it&#x27;s not quite there yet.
ksahinover 5 years ago
For my next side project, I&#x27;d like to test <a href="https:&#x2F;&#x2F;render.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;render.com&#x2F;</a> It seems like a cheaper alternative to Heroku. Any feedback on this?
评论 #22034326 未加载
fideloperover 5 years ago
There must be added cost for a managed databases or similar, right?<p>This sounds a lot like aws lambda (except nicer thanks to just running any container). In AWS’s case, you need to pay extra for RDS, redis, and any other persistence.
评论 #22028293 未加载
评论 #22028200 未加载
评论 #22028764 未加载
runeksover 5 years ago
&gt; The service will create more and more instances of your application up to the limit you defined (currently the cap is 1000 instances).<p>&gt; As long as you have architected your application to be stateless - storing data in something like a database (eg CloudSQL) or object storage (eg Cloud Storage) - then you are good to go.<p>Won’t this just defer the scalability issue to the SQL part of the application? It’s nice that the stateless REST part can be scaled almost infinitely, but if the SQL part doesn’t offer the same scalability, what’s the point? Last time I looked, CloudSQL didn’t offer this kind of scalability.
jupp0rover 5 years ago
Another option is Google Cloud AppEngine. It’s a little more limited in terms of languages that are supported, but the free tier is generous enough that I have never paid anything to run backends for side projects.
评论 #22028278 未加载
评论 #22028420 未加载
评论 #22031870 未加载
oli5679over 5 years ago
Is anyone familiar with pros&#x2F;cons vs. AWS ecs?<p>I&#x27;ve used ECS a few times, it&#x27;s pretty nice.<p><a href="https:&#x2F;&#x2F;aws.amazon.com&#x2F;ecs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;aws.amazon.com&#x2F;ecs&#x2F;</a>
评论 #22030810 未加载
ThinkBeatover 5 years ago
I often find myself what &quot;at scale&quot; means. It is used by so many different providers and it gets confusing.<p>When all you give the service is a container, how dos it know how to scale your project?<p>I presume it gives it more CPU and more RAM automagically but does that really provide &quot;at scale&quot;<p>I think of &quot;at scale&quot; to mean really a lot of traffic.<p>Spinning up new instances if your container is possible, but I think I would like an API where code can somehow interact with the scaling mechanism.<p>I guess &quot;stateless&quot; gives us some information.
dennisyover 5 years ago
I am using this and it is a much better development and deployment workflow when compared to cloud functions. The only thing it lacks is some bigger RAM for ML workloads.
elchupanebreover 5 years ago
We&#x27;ve been using Firebase and one of the issues we had is that methods become &quot;cold&quot;: if it&#x27;s not used for a few minutes, the latency of the next call is unpredictable and could be in tens of seconds. The way Cloud Run is described (&#x27;Only pay when your code is running&#x27;) suggests that it may suffer from it too. Does anyone know if it actually has the problem?
inscrutableover 5 years ago
started using this... pretty awesome vs the wall of yaml it replaces. Not suitable for all workloads (max 1cpu&#x2F;2 gigs ram, 4 minute max pod startup time, can&#x27;t do background work when not serving a request). But it replaces cert-manager, ingress-nginx, oauth2-proxy, k8s service, k8s deployment, k8s secret, k8s configmap, k8s hpa, k8s pdb, helm charts and cluster management.
评论 #22028066 未加载
评论 #22028530 未加载
rantwaspover 5 years ago
this has already been said, but due to the fact that this is google you have no idea when it&#x27;s going to get killed and most things from google get killed.<p>so i would suggest AWS. API Gateway + Lambda. It&#x27;s basically free for side-projects and the setup + operating it is trivial. It also scales (and you&#x27;re going to have to shell out real money) if you were to receive a lot of traffic.
评论 #22028635 未加载
jsjohnstover 5 years ago
As an illustrative of pricing:<p>If your deployment can run in 256MB of RAM w&#x2F; 1 vCPU, handles an average request in under 250ms, transfers 200kb or less per request on average, and you get 2 requests&#x2F;minute on average to your site:<p>The cost is around $2&#x2F;month USD, which I feel is a more likely scenario for a side project vs the “pennies a month” the OP claims.
评论 #22029036 未加载
评论 #22028501 未加载
superkuhover 5 years ago
Deploy you side-projects at more than the scale they&#x27;ll ever need at home on your hardware for actual nothing.
评论 #22028182 未加载
Mockapapellaover 5 years ago
I&#x27;ve been looking for a service like this for a while now. The only problem I&#x27;m seeing with regards to my use case is I need powerful GPUs for NLP inference to also scale up and down to demand. Can someone explain if this is possible with GCR and if so what do i need to do to accomplish it?
评论 #22030099 未加载
fareeshover 5 years ago
Might be a mindset thing but if my side project needed scale I would not think of it as a side project.
评论 #22028852 未加载
city41over 5 years ago
I’m just starting to explore cheap hosting for a web app and my initial digging suggests shared php hosting (with MySQL) is promising. It seems much cheaper than ruby, node, etc. Can anyone comment if my initial hunches are correct?
评论 #22029221 未加载
josephernestover 5 years ago
Is there an alternative with similar ease of use, i.e. you just pack the files, create a Dockerfile, and push it live?<p>(For same reasons as other comments, I don&#x27;t want to use another Google service for this, risk of being locked out, etc.)
tra3over 5 years ago
What kinds of applications take no time to startup though? I&#x27;m curious about the spin up time, &#x27;cause my rails applications take on the order of minutes. I guess you can schedule a keep alive elsewhere though..
ronyfadelover 5 years ago
Can anyone shed light on how this compares with Netlify? (Pricing and tech wise).<p>Netlify has basic DB&#x2F;Identity&#x2F;Lambda support so I’m guessing it could replace this entirely.<p>I’m using it only to host static websites at the moment.
评论 #22028085 未加载
评论 #22031182 未加载
karmakazeover 5 years ago
What do didn&#x27;t see mentioned is the latency for the first request when it&#x27;s effectively dealer to zero. To get initial traffic&#x2F;customers this is very important.
agottererover 5 years ago
Is there an easy equivalent for scheduled tasks in GCP? A background process that executes for a short period of time and then exists only charging you for the time it ran?
评论 #22028256 未加载
luordover 5 years ago
This doesn&#x27;t seem all that different from app engine or any other PaaS.<p>Even the example he wrote is similar (probably longer) to a small guide I wrote for deploying to gae.
abbadaddaover 5 years ago
Nice post! But this is a big hurdle for some, no? Are all your side projects fully stateless?<p>&gt; As long as you have architected your application to be stateless
ecmascriptover 5 years ago
Would be cool but I don&#x27;t trust Google enough. I rather pay more than to host on Google&#x27;s infrastructure.
iandanforthover 5 years ago
I&#x27;m not sure that &quot;at scale&quot; means anything if the author has never had one of their projects scale.
remmargorp64over 5 years ago
Of course, the downside to doing anything with a Google product is that it could be deprecated next year...
评论 #22027784 未加载
评论 #22028124 未加载
评论 #22027904 未加载
评论 #22027772 未加载
评论 #22027754 未加载
giorgiozover 5 years ago
YES with serverless you can really deploy your side projects at scale paying basically nothing if they don&#x27;t get visited.<p>The Serverless Framework on AWS Lambda though are more mature to do that. One of the biggest gotchas is using just one aws lambda function with the entire web server instead of doing one aws lambda for each endpoint.
ishankhare07over 5 years ago
Isn&#x27;t this exactly the same model as Amazon ECS(Elastic container service)?
scanrover 5 years ago
He mentions CloudSQL for storage. Anyone know if it’s also on-demand?
评论 #22028368 未加载
twaybackover 5 years ago
Your side projects don&#x27;t need scale :D :D
z023bsover 5 years ago
this is misleading, as cost curves are usually exponential for these types of managed services
评论 #22027975 未加载
评论 #22027931 未加载
datashowover 5 years ago
What will the bill look like if your website suddenly hit a big traffic (e.g. someone post your site on HN)?
评论 #22027879 未加载
评论 #22027909 未加载
评论 #22027891 未加载
realtalk_spover 5 years ago
Out of curiosity, how are people thinking about GCP platform risk after the &#x27;2023 deadline fiasco&#x27;[1]? Is it still a good idea to use GCP at all in the aftermath of them articulating that it could experience budgets cuts or even be axed entirely (though that latter seems much less likely)?<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21815260" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21815260</a>
EGregover 5 years ago
If you already have an EC2 instance reserved on AWS for a year, you could just throw all those small projects there.<p>If they are truly stateless then the bottleneck will probably be the database, anyway.<p>For anyone starting a new app I recommend just building apps that are TRULY serverless. Then you can make them client-first, work offline, not tied to on one particular domain name, support end-to-end encryption, be embarassingly parallel and scalable, and take an <i>activist position</i> against continuing centralization.<p>A fuller exposition is here, so I don’t have fo write a whole mountain of text: <a href="https:&#x2F;&#x2F;qbix.com&#x2F;blog&#x2F;2020&#x2F;01&#x2F;02&#x2F;the-case-for-building-client-first-web-apps&#x2F;" rel="nofollow">https:&#x2F;&#x2F;qbix.com&#x2F;blog&#x2F;2020&#x2F;01&#x2F;02&#x2F;the-case-for-building-clien...</a>