Zero-downtime deployment tool for web apps (created by DHH, creator of Rails)

  • I keep seeing those "zero-downtime" tools that really aren't. (This one will wait for app shutdown/startup) They try weird approaches and completely miss that rev-proxies supported this in many ways for ages.

    You can live-reload a config, update a link to a Unix socket, update an iptables rule, or do one of many other things that allow you to start the new app version and warm it up before switching new connections to it. Then kill the old one once it's idle. It's safer that way and it stops being a race vs the timeout of new connections.

  • This seems cool. Completely agree that K8S and friends have the right idea, but something simpler would be a great tool for projects that don't want to rent or dedicate K8S SRE team.

    I would like to see this use docker export to tar feature as an alternative to registry. That often a fragile or expensive piece of infra. Squashfs images optionally hosted on s3 would be neat.

    I love how it installs docker by default instead of expecting one to prep a server.

    Having a single tool setup whole env is awesome

  • I like the efforts here and even got a chance to contribute some patches to Rails around its recent Docker integrations.

    I'm also not a huge fan of Kubernetes until you need to use it, in which case it's remarkably good at the problems it solves.

    The README calls this out early on but this tool's take on zero downtime is to use Traefik's built in way to queue up requests while a backend is down. That means your app will be unresponsive to users until your app has finished restarting and Traefik releases those requests. If you decide not to use Traefik then you lose this feature.

    It is technically zero downtime in the sense a 502 isn't served but you need to deal with timeout issues and other caveats. The end user experience is worse than Kubernetes where you can do a full rolling update where the old and new versions of the app serve traffic in real-time without holding requests. IMO these solutions can't be compared.

  • This is not "zero-downtime", this is "zero-downtime, maybe, as long as nothing goes wrong and the new container comes up immediately".

    You would be much better off using something like dokku, which handles zero-downtime deploys properly and supports using a CHECKS file to verify that the new container is working properly before routing requests to it.

  • Similarly, as a shell script: https://github.com/Wowu/docker-rollout

  • > Kubernetes is a beast.

    It has a learning curve the same as this tool. Getting an app up and running in k8s is not that difficult and it's a transferable skill.

  • This, at first glance, looks pretty slick.

    I've been using rails since 2006, and deployed my first app via capistrano shortly thereafter. I also once deployed an app using deis to run a mini-heroku. I've been using kubernetes at work (since 2018) and on some raspberry pis at home. I'm going to kick the tires on this and see what its like.

  • https://dokku.com/

    Very mature. Very stable.

  • If you want some simpler, here is mypaas.

    https://github.com/almarklein/mypaas

    Really cool for one-server deployments!