4 ms·
> 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 fe
by nickjj 5y ago
> 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.
- goodoldneon 5y agoYour pragmatism is refreshing. This simple solution meets all your requirements so there isn’t a need to add complexity. Kudos!
- efrecon 5y agoThank you for a sane comment! In many cases, downtime can even be contractually ok.
- adflux 5y agoNice and simple, love it
- mr-karan 5y agoThis 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" :)
- strzibny 5y agoI like this pragmatism and I teach it as well (https://deploymentfromscratch.com/ 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.