B
B
BonBon Slick2019-11-06 13:15:38
PHP
BonBon Slick, 2019-11-06 13:15:38

How to prevent new users from watching videos on the site when the server is overloaded?

Who had time, he ate.
1 - the maximum server, as I understand it, outputs data up to 100 Mbps, that is, only conditionally 100 users can simultaneously download or watch videos, how to expand this channel without creating another storage?
2 - actually how to temporarily limit viewing and downloading video when the channel is full? After all, if there are 1,000 users on the site and they are all trying to watch the video, then there will not be enough for everyone, as a result, everyone will slow down. So, as a temporary solution, it is necessary to prohibit downloads and views if the server is already loaded? It's not clear to me how to properly check the load and disable it.
How would you do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
profesor08, 2019-11-06
@BonBonSlick

Obviously we need to expand the channel. Negotiate with hosting.

K
Kirill Gorelov, 2019-11-07
@Kirill-Gorelov

Man, I'm not exactly sure, but try "going the other way."
In php, you can hardly think of anything. So you need to use Linux tools.
You look how much your server receives and transmits traffic and php already closes the video view.
That is, once a minute you turn to the server, look at its traffic and already make a decision.
To be honest, I'm not even sure that this can work, I was just interested in this question myself and I thought how I would do it. This is the first thing I would check.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question