Charly's Column – Mod_bw for Apache

Fighting the Heavyweights

Article from Issue 162/2014
Author(s):

A powerful web server will not help you much if too many users are competing for the bandwidth of its network connection. Sys admin columnist Charly came to a decision: The big data hogs get less favorable spots at his watering hole in future.

I have a web server with a 100Mbps connection that runs dozens of virtual hosts. One of them provides ISO images of Linux distributions, some of which are several gigabytes in size. If enough people try to grab them at the same time, the pipes get blocked  – downloads push the remaining HTTP traffic off the road, Apache response times skyrocket, and users are annoyed.

My solution here goes by the name of libapache2-mod-bw [1], or similar, depending on your distribution. With this module, I can control the use of bandwidth (bw). Figure 1 shows an example with an excerpt from an Apache configuration that demonstrates the module's abilities.

Figure 1: Apache sample configuration with mod_bw directives.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Charly's Column: Trickle

    If your data traffic suffers from congestion at times, don't worry. Now you can shoot down programs that are heavy on traffic to free up the inflow and outflow.

  • Charly's Column

    Some weather forecasts give you the temperature and a windchill adjustment, and a similar forecast for bandwidth would be helpful. If you feel the bandwidth is too low – and it always is – you need some kind of measuring instrument to reveal the truth.

  • Charly's Column

    The Apache web server can fight back against DoS attacks. You just need a little help from Mod_evasive.

  • Charly's Column

    Zsync handles a special case: large volume download files that change frequently but not drastically. Charly shows how this handy file fetcher can save you time and bandwidth.

  • Charly's Column: iWatch

    Recently, sys admin Charly was faced with the task of synchronizing a directory on a server with two NFS-mounted clients. He wanted the whole thing to happen quickly and to be easily manageable, which ruled out DRBD and GlusterFS.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News