Woo zero downtime deployments for ! ๐ฅณ
@semperos๐profilefollowPresbyter, husband, father, technologist, linguist, musician.replied to@stagas๐คธprofilefollow
creative technologist
creator of textlog:
creative technologist
creator of textlog:Congrats and much appreciated!
@evnmprofilefollowSoftware engineerGitHubevnm - Overviewevnm has 51 repositories available. Follow their code on GitHub., trail runnerStravaSignup for free to see more about LawrenceJoin Lawrence and get inspired for your next workout, gear-maker. Working on something new for homeownersgetonmain.comMain ยท A quiet, well-organized record of everything that keeps your home running.A quiet, well-organized record of everything that keeps your home running.replied to@stagas๐คธprofilefollow
creative technologist
creator of textlog:
creative technologist
creator of textlog:Say more!
@stagas๐คธprofilefollow
creative technologist
creator of textlogreplied to@evnmprofilefollowSoftware engineerGitHubevnm - Overviewevnm has 51 repositories available. Follow their code on GitHub., trail runnerStravaSignup for free to see more about LawrenceJoin Lawrence and get inspired for your next workout, gear-maker. Working on something new for homeownersgetonmain.comMain ยท A quiet, well-organized record of everything that keeps your home running.A quiet, well-organized record of everything that keeps your home running.:
creative technologist
creator of textlogreplied to@evnmprofilefollowSoftware engineerGitHubevnm - Overviewevnm has 51 repositories available. Follow their code on GitHub., trail runnerStravaSignup for free to see more about LawrenceJoin Lawrence and get inspired for your next workout, gear-maker. Working on something new for homeownersgetonmain.comMain ยท A quiet, well-organized record of everything that keeps your home running.A quiet, well-organized record of everything that keeps your home running.:Nothing fancy, a blue/green architecture with systemd and Caddy, and a script that swaps between the 2 instances when the new one becomes /healthy, and as an upside if the new deployment fails the old one never stops serving requests.
@avioliprofilefollowProgrammer by day and night. Lover of art. Mixing art and programming is the dream.replied to@stagas๐คธprofilefollow
creative technologist
creator of textlog:
creative technologist
creator of textlog:Does the system properly waits for ongoing requests on old instance before shutdown?
@stagas๐คธprofilefollow
creative technologist
creator of textlogreplied to@avioliprofilefollowProgrammer by day and night. Lover of art. Mixing art and programming is the dream.:
creative technologist
creator of textlogreplied to@avioliprofilefollowProgrammer by day and night. Lover of art. Mixing art and programming is the dream.:Yes, it uses Bunโs
server.stop(false) which does graceful shutdown draining old connections and stops receiving new ones in the meantime. Iโm not sure what happens with those new ones that arrive after that call but before the server switch, but that happens in under a second and there is a tiny retry browsers do on 503 so it should be ok.I got worried and properly fixed it now, the draining happens after the switch so it will not drop any requests!
@avioliprofilefollowProgrammer by day and night. Lover of art. Mixing art and programming is the dream.replied to@stagas๐คธprofilefollow
creative technologist
creator of textlog:
creative technologist
creator of textlog:I thought it is a load balancer, but I guess it is not then.
Load balancers are great for blue/green deployments - new instances take new jobs the moment they are running while old services stop taking new ones and wrap up any old ongoing ones. Which means you have at least one old instance and a new one running at the same time until the old one shuts down properly.
@stagas๐คธprofilefollow
creative technologist
creator of textlogreplied to@avioliprofilefollowProgrammer by day and night. Lover of art. Mixing art and programming is the dream.:
creative technologist
creator of textlogreplied to@avioliprofilefollowProgrammer by day and night. Lover of art. Mixing art and programming is the dream.:No itโs just a script with systemd and Caddy I hacked together with ChatGPT. Backend is not my forte lol. Also I like to first do the low-level thing to understand it, then use abstractions. Probably going to switch to something nicer in the future but for now weโre good.
one of the times where I find it fine to run k8s (just k3s) for my personal project so I don't need to rewrite a lot of tooling we have at work for b/g deploys (doesn't run on k8s, just something similar)
Interesting. So it adds more than it takes away in context of a fairly popular hobby project?
I think so. Claude is very good at admin-ing k8s to the point where I can describe the deployment styling I like and use it on a per component basis.
Using Claude also helped me start with my own custom resource controllers to control large swaths of my architecture as reconciliation code rather than one shotting things with terraform or cli commands.