Squid limits the speed of the network-Linux Enterprise Application-Linux server application information. The following is a detailed description. To implement the function of limiting the network speed, you must re-compile squid and activate the-enable-delay-pools option. The method is as follows:
1. Download the squid source code (to the official website)
2. Compile squid
1) install gcc make
2) Prepare for compilation, that is, configure in the source code
# Cd source code directory
# Chmod a + x./configure
#. /Configure-prefix =/usr-localstatedir =/var-libexecdir =$ {prefix}/lib/squid-datadir =$ {prefix}/share/squid-sysconfdir =/etc/ squid-enable-delay-pools-enable-snmp-enable-cache-digests-enable-basic-auth-helpers = NCSA-enable-external-acl-helpers = wbinfo_group-enable- external-acl-helpers = winbind_group-enable-ntlm-auth-helpers = SMB
This is the configuration of my server. You can select the options to activate based on your situation.
3) Compile and install
# Make
# Make install
4) Configure squid. conf
Add the following lines:
Delay_pools 1
Delay_class 1 1
Delay_access 1 allow all
Delay_parameters 1 50000/50000 # limit the network speed to less than 50 KB
Delay_initial_bucket_level 50
The above is only the configuration added to limit the speed of the network. Other configurations will not be mentioned.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service