4 ms·
I do have a slight downtime (1 second or so) when upgrading containers since the bash scripts just pulls the new image, stops/rm the container and start up the
by gorbypark 8y ago
I do have a slight downtime (1 second or so) when upgrading containers since the bash scripts just pulls the new image, stops/rm the container and start up the new one... Although my project is for an enterprise customer who works 7am-5:30pm so I just do it outside of those hours. Each end point is it's own instance too, which minimizes the likely hood of anyone knowing.
It was all designed to run on kubernetes which would allow rolling updates with zero downtime, but I can't justify the cost of a cluster at the moment.
The node app and postgres are on different instances. They could easily be on the same, though. Postgres is open to the world since GIS analysts need to be able to connect to it with QGIS. The API is also open to the world using CORS for the same reason (a custom GIS collection tool accesses the REST API).
- ngrilly 8y agoInteresting! I think a 1 second downtime when deploying a new version of the backend is tolerable if the app is a single-page application, because the app can implement a retry logic client-side. This is possible only if the backend can be stopped and restarted really quickly. Otherwise, a rolling update or green-bue deployment is necessary. Another question: do you expose your Node service directly to the Internet, or is it behind a reverse proxy?