W
W
WebDev2019-07-01 11:55:00
Scalability
WebDev, 2019-07-01 11:55:00

Which approach to choose for horizontal scaling?

Tell me how to scale the project correctly.
In my head, the ideal picture looks like this:
Several identical servers that receive user traffic through the balancer.
For example, 5 servers, each server is a copy of other servers, that is, they are the same, requests are distributed evenly between them. If one of them falls, the system continues to work without it.
After reading various articles, I came to the conclusion that there are several problems here:
1) Data synchronization, if this is replication, then there may be delays. They can be insignificant, a few hundred milliseconds, but if the user has one request sent to the server where there is data, and the second to the server where there is no data, then you get a mess.
2) The way out of the first situation can be simultaneous recording on all servers. That is, the backend writes to all databases at once. Here the delay becomes a problem, because firstly, the time will grow with the growth of the number of servers, if we decide to buy 10 more servers, then the record on all servers will increase. Secondly, if the servers are located in different data centers, then the delay is even more noticeable.
I'm at a dead end, this is a standard situation, everything is scaled horizontally, but I still haven't found a clear guide.
I see the option with horizontal scaling as ideal, because, firstly, you can endlessly buy more servers and increase capacity, and secondly, the servers are located in different data centers, the whole data center can break down, but the system will continue to work. I have no experience in administration, tell me how to scale correctly.
PS. You will be asked what resources are running out on the server. Basically a disk and a little processor, but there is another problem, I would like the servers to be in different data centers, because, for example, Hetzner often crashes and this affects many servers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-07-01
@inoise

Everyone has already thought of it before you) 12factor
And for horizontal scaling - balancers should also be scaled)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question