There is now a file download server of HTTP, which has currently limited the download speed of single thread. The speed is 200kb/s but if the user uses multi-threading to download, such as Thunder. You can break through the limitations and achieve double the effect. May I ask how centos can limit the speed above?
曾经蜡笔没有小新2017-06-27 09:20:22
You can use nginx’s limit_conn_module to limit the number of client IP connections.
The following is a simplified configuration:
http {
limit_conn_zone $binary_remote_addr zone=addr:10m;
server {
limit_conn addr 1;
}
}
limit_conn_zone
Define a bucket that limits connections;
$binary_remote_addr
means to calculate the number of connections based on the client IP as the key;
zone=addr
Declare the name of this bucket;
limit_conn
executes a limit on the number of connections, and the following addr
is to call the previously configured bucket.