I have a mirror service, and the external mapping port is 8787
. Now I need to update this image service. How to update it without downtime in the update process?
the current solution is to use nginx as a proxy, and then write a script. The update steps are as follows:
1, start the new image, and the corresponding mapping port is 9797
,
2. After checking that the image is started successfully, point the nginx to 9797,
3, and then redeploy the 8787
service. After checking that the image is started successfully, point the nginx to the 8787
port, then close the 9797
port, and finally the hot deployment is completed.
I"m too lazy to write scripts now. Is there any way to be simple, fast and stable? And it can be rolled back flexibly.