Apache / PHP test server choke on request

I recently installed a test server running in a virtual machine on my computer, so I can do things like interactive debugging with XDebug. For the most part, this is pretty nice, but I ran into a problem while running multiple requests to the server from the same client at the same time.

The problem is that the hostโ€™s network connection doesnโ€™t really exist as a physical connection, so it will work as fast as computer hardware will allow it. This is usually not a big problem, but I try to monitor the download of APC files, and this requires that the AJAX request be executed in parallel with the file download to control its performance. In the real world, the network will introduce lag and delay and the like, leaving enough unused bandwidth to request AjAX to work in parallel with file downloads. However, in the test machine, the AJAX request cannot receive data from the server until the download is complete, because it will not have bandwidth available.

Is it possible to configure some kind of bandwidth control in a virtual machine (in Apache, PHP or some Linux utility), which can limit the bandwidth available for an HTTP request? For example, so that each request is limited to 1 Mbps, but can there be several requests between the client and the server at the same time? I hope that if this can be done, this will allow the AJAX request to receive its data at boot time, and not stop until the download is complete.

I tried the IPRelay utility, but it doesn't seem to me that it works, or at least not the way it limits the request.

+3
source share
2 answers

. , Linux iprelay, , , , . , APC, .

0

, , Traffic Shaping.

Lighttpd ( Apache)

Apache .

ServerFault, ...

0

Source: https://habr.com/ru/post/1780720/


All Articles