4 ms·
Another, more hacky option, would be to teach the binary executable how to download a new version, and start it to replace itself, while staying in the same con
by ngrilly 4y ago
Another, more hacky option, would be to teach the binary executable how to download a new version, and start it to replace itself, while staying in the same container. Nginx does this for example. Of course, that’s some additional complexity, but then it is possible to have zero downtime upgrades (by basically upgrading the executable in the container but not the container itself). It is also possible, and simpler to upgrade the container, if it’s possible for
different containers to share the same volume, but I don’t think this is possible on Fly.io.
- markusw 4y agoI believe systemd can do something similar, essentially replacing the binary and queueing network calls while doing so.
- ngrilly 4y agoYes, systemd does that. But as you wrote, it will queue network calls. The nice thing with the method I suggest above is that both Go processes, the old one and the new one, can be both serving requests in parallel, as they can share the same SQLite file, which makes it really zero-downtime.