E
E
EVOSandru62017-07-24 20:57:16
Yii
EVOSandru6, 2017-07-24 20:57:16

How to deal with high server load?

Good afternoon,
I am developing a highly specialized system.
Part for it, where sockets are needed on NodeJs and Socket.io
Server part on Yii2
Web Server - Apache2
This is a little confusing in the TOR - Online chat attendance from 300 logged in users. Website traffic from 5000 logged in users at a time. Beyond indexes in tables, caching of static and rarely changed elements - how else can you optimize performance?
Throw information please - where to dig?
A little considered such concepts as load balancing and server scaling. I would like to hear from professionals - what practices should be used today.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mitaichik, 2017-07-25
@EVOSandru6

First, forget about Apache. Use nginx.
Secondly, I strongly advise you to study ruhighload.com, you can start with https://ruhighload.com/post/%D0%90%D1%80%D1%85%D0%...
Thirdly, the numbers do not speak. More important is the number of requests at the same time (for 5000 users * 2 requests per hour for each - this is garbage) and the response generation time - this is important.
If there are really 5000 simultaneous requests at the same time - on the same server with php you won’t be able to pull it straight, you need to think about several backends with load balance. Personally, I would not think about php at all with such a variant.
In general - I would start writing as it is, and already in the process I started optimizing - all customers think that they will have 5000 users at the same time at the same time, but life is cruel, let them at least get a hundred first.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question