News for hackers. Stuff that matters.
Re:Best practices around creating production ready web apps ... by nickjj on Tuesday June 01, 2021 @07:40PM (#27362874)
> how do you handle no downtime deployments?

I take the few second downtime hit on each deploy. I know, it's iNsAniTy but it's really not. A 5 second blip a few times a week is no biggie for most SAAS apps or services.

To me that's well worth the trade offs of not having to deal with a load balancer, a container orchestrator tool, dealing with database migrations that need to be compatible for 2 versions of your app as it's being rolling restart and all of the other fun complexities of running a zero down time service.

You can still architect your app in a flexible way (env vars, keeping your web servers stateless, uploading user content to S3 or another object store, etc.) so that moving to something like Kubernetes is less painful if / when the time comes. It's just for me, that time has never come.

> how do you backup data?

A background job / cron job runs every few hours and does a pg_dump to a directory in a block storage device. Could easily change that to be S3 too. Just comes down to preference. Personally I found it easier to drop it into block storage since it's just copying the file to a directory.

Re:Best practices around creating production ready web apps ... by goodoldneon on Tuesday June 01, 2021 @09:40PM (#27363801)
Your pragmatism is refreshing. This simple solution meets all your requirements so there isn’t a need to add complexity. Kudos!
Re:Best practices around creating production ready web apps ... by strzibny on Wednesday June 02, 2021 @11:58AM (#27370225)
I like this pragmatism and I teach it as well (https://deploymentfromscratch.com/). Just want to say that you can employ systemd socket activation for systemd services, and you can have zero-downtime deployment without load balancers.
Re:Best practices around creating production ready web apps ... by efrecon on Wednesday June 02, 2021 @02:22AM (#27365523)
Thank you for a sane comment! In many cases, downtime can even be contractually ok.
Re:Best practices around creating production ready web apps ... by mr-karan on Wednesday June 02, 2021 @10:49AM (#27369326)
This is a great response and refreshing to see things can just be simple, if one tries to cover 99% of usecases and not go crazy overboard trying to solve just 1% of edge cases with "container orchestration" :)
Re:Best practices around creating production ready web apps ... by adflux on Wednesday June 02, 2021 @02:42AM (#27365654)
Nice and simple, love it