Z
Z
Zakirzhan2020-09-25 22:04:23
PHP
Zakirzhan, 2020-09-25 22:04:23

How to immediately update the script on 5 servers connected to 1 load-balancer?

How to immediately update the script on 5 servers connected to 1 load-balancer (round-robin)?
A practical algorithm for the script or tell me if there are ready-made solutions, I will be very grateful

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nokimaro, 2020-09-25
@nokimaro

I recommend that you familiarize yourself with the general theory https://habr.com/ru/company/oleg-bunin/blog/449916/
Of course, it depends on the technological processes, but usually the simplest scheme looks like the latest version of the code is taken from a certain repository with code, then the build process is performed, migrations are carried out if necessary, and the source folder is replaced by editing the symlink.
You can look in the direction of such a utility as Deployer , which has the necessary functionality, including parallel deployment to the Nth number of servers with simultaneous rollout of the update and, most importantly, the ability to roll back to the previous version.

V
vilinyh, 2020-09-26
@vilinyh

Ready solutions - docker and K8S (AWS ECS/EKS). Two deployment strategies fit the "immediately update" criterion:
- recreate (there will be a downtime, but the easiest way is easy to reproduce even without a cube) - https://github.com/ContainerSolutions/k8s-deployme...
- blue/green (traffic switch between old and new version) - https://github.com/ContainerSolutions/k8s-deployme...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question