D
D
dgfjhgjkhkfdjh2018-04-07 16:22:43
Load balancing
dgfjhgjkhkfdjh, 2018-04-07 16:22:43

What is a load balancer usually built on?

How architecture is usually built for high-load projects.
Let's say there is a domain with a script that receives 1,000 people a day, and suddenly 1,000,000 people come to it tomorrow.
The script works with the mysql database on every connection.
The script will fail accordingly.
What steps would you take under load, provided that it is pointless to increase the capacity of the server?
Maybe there are some specific functions in node and php for this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
chromimon, 2018-04-07
@chromimon

Let's say there is a domain with a script that receives 1,000 people a day, and what if tomorrow 1,000,000 people come to it.

1000 a day is ugh and not a load
tomorrow suddenly 1,000,000 - it won't come, don't dream. But if yesterday it was 100,000, then tomorrow 1,000,000 is real, yes.
if anyone comes on such a scale, it's DDoS, and it needs to be processed by other methods, obviously not load balancing.
It makes no sense economically, with a load of 1000, to take the steps that are needed to serve 1,000,000. You will spend resources on preparation - but you will not wait for 1,000,000.
If you really want to learn 1,000,000, then forget about this:
And switch to normal architecture.
For example, an article where, just for beginners, it is well chewed, where exactly beginners mess up in matters of performance
https://habrahabr.ru/post/113298/

R
Roman Mirilaczvili, 2018-12-24
@2ord

You need to use message queues to distribute the load.
I advise you to read https://ruhighload.com/%D0%9E%D1%87%D0%B5%D1%80%D0...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question