Speed limit on the performance of certain external requests?


Let's say there is a multiplayer engine, some parts of which may have something to parse from the outside by the user. I would like to limit the speed of certain external requests for some users.


Interested in using any server side technologies that can be implemented — possibly through nginx or apache or UNIX utilities as it is possible to limit certain requests? Or need to pass these requests through samopisny utility and there, at the system level trim speed? How to do it better? To finish something is not a problem, I would like to understand the theory. Task, I think, clear.

Now thought out the architecture of the web application, so which scripting language will be written the engine, I think, is not important. Say yet in PHP.

For links also I would be very grateful.

Thank you.
October 14th 19 at 12:32
1 answer
October 14th 19 at 12:34
The question is not very clear, I will try to teleportirovat:)

You also probably have a gradation with a fixed speed:
user role A — speed 100Kb
user with role B — speed 200Kb

If so, then you can use a set of local proxies, each of which will be a restriction on the download speed. Squid for example it allows.
Therefore, the users with role A will use A proxy, users with role B, respectively, to proxy B. - alexanne_Feest43 commented on October 14th 19 at 12:37
A little more on the squid — it allows you to set the speed limit depending on the request header, it's even easier, will send some special header that identifies the user. - alexanne_Feest43 commented on October 14th 19 at 12:40
Thank you. In General, everything is simple. I will dig into the side of the Squid :) - deondre_Borer commented on October 14th 19 at 12:43

Find more questions by tags Client side optimization