Live data from Hacker News

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

alexolivier.me

261–270 of 397 posts

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

#261

Earlier quoted context omitted.

Years ago I ran a side project that went viral. It grew to 60k visitors a day and my monthly cloud expenses were around $1,500. I cannot fathom a scenario where you get a surprise $100k bill from a viral hit. Anytime my project went down due to scaling, it was painful. You don’t get many chances at going viral.

60k is on the low-end of visits only from HN where I've normally seen 100k+. I saw around 60k once of 4-5 of my projects hitting the front-page. Also I know I make mistakes, both at coding and at setting things up, which can easily trash things around and make a 10x-100x multiplier for the cost. The risk is small, but the consequences are horrible so I prefer to avoid this risk. Edit: also note that even a $10k would…

That depends a lot on the article and the views from reports on reddit/twitter/facebook/linkedin. 100k is rather toward the top of the curve.

Here I've published stats on my few posts that reached first page on HN. https://thehftguy.com/2017/09/26/hitting-hacker-news-front-p...

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

#262
post #150

This article fails to mention the issue of needing a database. It doesn't matter how seamlessly your application can scale if your data backend won't scale with it. 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't $0 if your app gets 0 traffic, you are going to have to pay to keep that running around the clock…

AWS has Aurora Serverless ( https://aws.amazon.com/rds/aurora/serverless/ ) for that purpose with MySQL and Postgres compatible engines. But I haven't heard anyone using it for side projects yet.

Note that you can either run Aurora Serverless constantly (at a cost of about $43 a month) or have ~30 second startup times if the instance has timed out (~15 minutes).

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

#263

Can anyone shed light on how this compares with Netlify? (Pricing and tech wise). Netlify has basic DB/Identity/Lambda support so I’m guessing it could replace this entirely. I’m using it only to host static websites at the moment.

Netlify's stupid-easy for small projects. You just point it at a Github repo and it does the rest. As long as you're staying under its usage caps, and you can run all the server code in lambda functions, it seems like the best choice.

Once you exceed the free tier, though, no doubt it's much more expensive than GCP/AWS.

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

#264

Earlier quoted context omitted.

> I'd much rather overpay $20-50/month I don't think the alternatives are nearly that expensive. Vultr, DigitalOcean and others have virtual private servers for only $5 per month. They're small instances but totally fine for side-projects. I run a cheap $5/month VPS and it was able to withstand my project making the HN front page without issues. I don't use Google cloud hosting for the same reasons as you, I don't wa…

+1 to just running something on a cheap Digital Ocean style box. In our modern cloud age, I think we've forgotten how much a single box can actually handle (and how few of us actually _need_ to "scale" from day one). Hacker News front page isn't really that much traffic in the grand scheme of things. My $5 DO instance handled it without a sweat. Hell, even "real" projects can still work under this approach. A $20/mo…

A few years ago I set up a $5 DO droplet with the Dokku image they provide. Years later it's still running all of my side projects in production, even though I moved from the $5/mo plan to the $20/mo plan as my business grew and my needs increased.

I have 15 containers connected to 10 Postgres instances running right now handling tens of thousands of views per month for $20/mo, AND I have Heroku-like convenience to deploy with a "git push dokku master", without having to pay a minimum of $7/mo for each app I deploy. I can deploy a new app at no extra cost

Sure, I have to patch my own OS (minimal effort but still effort) and backups/DR/HA is on me to provide, so it might not be for everyone. But I have a mantra that all my side projects combined need to be able to pay for all my side projects combined to keep me from spending too much, so keeping costs low is important. And that $20/mo would be over $100/mo on Heroku. For me it was a no-brainer. One low-revenue side project pays the bills for all my just-for-fun projects.

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

#265
Out of curiosity, how are people thinking about GCP platform risk after the '2023 deadline fiasco'[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)?

[1] https://news.ycombinator.com/item?id=21815260

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

#266

Earlier quoted context omitted.

Good luck telling the judge your single person LLC with no investors shouldn't be pierced to pay debts incurred by its only owner and only employee.

Works fine if you didn’t co-mingle personal usage of the business accounts.

This VERY heavily depends on your state and I'm sure a lot of other factors. Years ago when I set up my single-member LLC my lawyer was quick to point out a thousand ways the LLC would be useless in court. Mingling bank accounts was only one of them.

The IRS, for what it's worth, treats a single-member LLC as a sole proprietorship and all losses/gains are considered personal income.

As always, check your state laws and consult a real, in-person lawyer.

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

#267

Earlier quoted context omitted.

+1 to just running something on a cheap Digital Ocean style box. In our modern cloud age, I think we've forgotten how much a single box can actually handle (and how few of us actually _need_ to "scale" from day one). Hacker News front page isn't really that much traffic in the grand scheme of things. My $5 DO instance handled it without a sweat. Hell, even "real" projects can still work under this approach. A $20/mo…

A few years ago I set up a $5 DO droplet with the Dokku image they provide. Years later it's still running all of my side projects in production, even though I moved from the $5/mo plan to the $20/mo plan as my business grew and my needs increased. I have 15 containers connected to 10 Postgres instances running right now handling tens of thousands of views per month for $20/mo, AND I have Heroku-like convenience to d…

Sounds like a great setup. Do you have any documentation on it that others could follow to build something similar or links to tutorials that helped you?

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

#268

I have used it for work-related reasons and indeed the service is quite nice. But I don't use Google Cloud Run for personal projects for two reasons: - No way of limiting the expenses AFAIK. I don't want the possibility of having a huge bill on my name that I cannot pay. This unfortunately applies to other clouds. - The risk of being locked out. For many, many reasons (including the above), you can get locked out of…

I had the same thoughts: even if I like Google Cloud a lot (I use it extensively at work), I don’t feel it’s safe for me to use it at home, since I don’t want to risk having my entire google account locked due to “suspicious activity”, whatever that might mean. In fact, I recently shut down a personal App Engine service I had been using for myself for a few years just because of this paranoia. The service was not doi…

I used to use google docs until they randomly locked one of the docs I was working on for a week due to one of their "suspicious activity" scripts. Really hammered in the message that if you don't host it then you don't own it.

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

#269
post #254

Earlier quoted context omitted.

I had the same thoughts: even if I like Google Cloud a lot (I use it extensively at work), I don’t feel it’s safe for me to use it at home, since I don’t want to risk having my entire google account locked due to “suspicious activity”, whatever that might mean. In fact, I recently shut down a personal App Engine service I had been using for myself for a few years just because of this paranoia. The service was not doi…

> since I don’t want to risk having my entire google account locked due to “suspicious activity”, whatever that might mean. Agreed. I often second guess my usage of various Google apps and services since I don't want to trigger some process that I would have no way of ever knowing. The recent case of someone getting banned from using Apple Pay comes to mind ( https://news.ycombinator.com/item?id=20841586 )

Sounds like self-censorship in dystopia full of secret laws. I'm glad Google isn't running a country.

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

#270
post #267

Earlier quoted context omitted.

A few years ago I set up a $5 DO droplet with the Dokku image they provide. Years later it's still running all of my side projects in production, even though I moved from the $5/mo plan to the $20/mo plan as my business grew and my needs increased. I have 15 containers connected to 10 Postgres instances running right now handling tens of thousands of views per month for $20/mo, AND I have Heroku-like convenience to d…

Sounds like a great setup. Do you have any documentation on it that others could follow to build something similar or links to tutorials that helped you?

Luckily Digital Ocean and the Dokku project have pretty great documentation on their own. Here's the one-click image for DO: https://marketplace.digitalocean.com/apps/dokku

I just looked up DO's guides for Dokku and it seems like they're redirecting to the deploy page... that's a shame, they were quite good. In case it's just a bug on my side, here's the link: https://www.digitalocean.com/community/tags/dokku?type=tutor...

And Dokku's documentation, which is quite good as well: http://dokku.viewdocs.io/dokku/deployment/application-deploy...

For deploying, it works basically the same as Heroku except there's no GUI for it. Following Dokku's deploy guide top to bottom works perfectly. Look into Dokku plugins for things you might want/need (database support is a plugin, for example) and it uses a system called "herokuish" to allow Heroku buildpacks to work if you have weird stacks like React on Rails. Or you can bring your own Dockerfiles and avoid buildpacks altogether. Ultimately Dokku just manages Docker containers like a lightweight, single host Kubernetes.

Eventually I'm going to have to migrate to Kubernetes... Dokku's lack of built-in HA/DR/load balancing is its main drawback. But it's served me well for years with very minimal maintenance. I hardly ever even think about my infrastructure stack because it just gets out of the way. Which is incredible because it's so small and lightweight, built mostly with Bash scripts.

Post reply on HN