Live data from Hacker News

Ask HN: How do you deploy your weekend project in 2022?

news.ycombinator.com

11–20 of 50 posts

Re: Ask HN: How do you deploy your weekend project in 2022?

#13
AWS CDK is pretty magical. The whole "constructs" that they have are very powerful. I was able to setup a scale-to-zero RDS Serverless database with an auto scaling backend using ECS + Fargate in a few hours. (With zero prior experience with the CDK)

You can see that code here if you're curious: https://github.com/lunasec-io/lunasec/blob/master/lunatrace/...

It's more complicated now but if you look at the history of that "backend-cdk" folder then it's simpler a few months ago.

The important bit is the "ecs-patterns" library. That's the one that is magical and deals with setting up the load balancer, cluster, etc for you. And the way we shove the Docker images in I found to be quite straightforward. (And deploys are one line)

Re: Ask HN: How do you deploy your weekend project in 2022?

#14
If auto scale is needed, then I‘m sticking to Firebase hosting, cloud functions written in NodeJS and BigQuery or Firestore depending on the update frequency

For recent projects where auto scale is not needed I‘m happily using FlightPHP as a REST framework and use SQLite as my db service. Frontend UI is provided by just including Bootstrap.

This setup feels great, because it takes me back to my origins of web development: simple tools that work and get stuff of my plate.

Before installing 250 MB of NPM dependencies, pre-processors etc.

Re: Ask HN: How do you deploy your weekend project in 2022?

#15
Bare metal from the likes of Hetzner for most things. Serverless for some small components which benefit from global distribution.

I currently have ~30 containers running on a Hetzner server w/ 64GB of RAM and 16 dedicated cores for ~$25/mo. I even get direct access to the Intel iGPU for graphics acceleration at no additional cost.

Cloud providers like AWS give you a couple orders of magnitude less resources for the same dollars. Too many engineers are getting fleeced into using crappy solutions (VPS's, almost anything by AWS/Azure/GCloud/Digital Ocean) because they're all they've ever known.

Re: Ask HN: How do you deploy your weekend project in 2022?

#16
I don't side-project anymore, but here's what I used to do back in the day:

I got myself a dedicated box from OVH, located in Canada. 32 threads, 64 GB EEC, NVMe disks and unmetered 1Gbps outgoing link. That cost me ~$100.

In it I had my application server and database, as well as disk caching layer in front of S3.

No need to worry about auto-scaling, as that beefy server could take care of 10-100x more users than I currently handled.

No need to worry about bandwidth costs or getting DDoSed. The gigabit link was more than sufficient (I think I used 5% of it), and OVH provides an anti-ddos service included in the price.

I had a cheaper ($10) dedicated box from Kimsufi which I used to host CI, Phabricator and other non-critical stuff.

I'd deploy with a simple ansible script which would launch a new docker container that HAProxy would then point to (similar to a green-blue deployment). This allowed me to deploy small changes[0] silently and I could test them before the actual release.

My side project was not critical enough, so if for any reason my host was unreachable I could perform a disaster recovery anywhere else by restoring from my backups. In ~4 years, I never had to do that.

If I were to start a side / weekend project today, I would probably follow a similar route. Running cloud compute instances with unpredictable bandwidth billing gives me anxiety.

[0] - As long as they did not have database migrations in them.

Re: Ask HN: How do you deploy your weekend project in 2022?

#17
on aws as scale to zero services. lambda, dynamo, s3, and ephemeral ec2 spot.

when egress bandwidth is needed i use cloudflare workers + r2 just like i would use s3 presigned urls.

services with no usage should have no cost. services with usage should bill based on usage.

typically i start from a full project template[1][2]. sometimes i start from scratch[3].

1. https://github.com/nathants/aws-gocljs

2. https://github.com/nathants/aws-exec

3. https://github.com/nathants/libaws

Re: Ask HN: How do you deploy your weekend project in 2022?

#20
since nobofy mentioned, I use https://caprover.com and a server on Hetzner. Caprover is easy to install and use, it has ui, cli, different deployment methods, automatic let's encrypt and possibility to install predefined apps like a database for example. I don't use cluster mode, since there is no need for me, but it has cluster support as well. I would say it is perfect fit for small home lab for personal projects.
Post reply on HN