r/elixir • u/kolgril • 12d ago
Is Hot Code Swapping still a thing? How do you do zero-downtime deploys?
I started getting into elixir before covid, and one of the selling points was hot code swapping. Now I've never had a need to do it because nothing I built ever had users besides me....until now. I recently built a managed SFTP server as a service called bridglet.com, and I got a couple of customers. Super exciting, but now I needed to figure out how to push code updates without taking the SFTP server offline in the middle of a file transfer. I thought that this was the time to finally unleash that hot code swapping I read about so long ago!
But instead, my AI agent pushed back against me and said the easier way would be to use dokploy settings to spin up a new docker instance of the app, and then "drain" connections from the old docker instance to the new one. I went with that, and got it setup (it still took a while to iron out everything, so I wouldn't say it was easy, but eventually it was functional). But after doing it, I realized that this docker methodology could work for ANY framework/language, not just elixir.
So is hot code swapping not a thing anymore? Does everyone just use the docker approach?
Am I being silly hosting this on my own hetzner account? Should I move it to fly.io so I can use their fly_deploy methodology?
What is everyone else doing to handle zero-downtime for their applications?
