magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 01 > Programming with Perl  

Reducing Bandwidth Artificially

Most Web surfers have slow boxes attached to a 28.8-kbps modem. But as more of the world shifts to faster solutions -- X2, K56flex, ISDN, or T-1 -- the increasing demands on a Web server can sometimes be substantial.

Many ISPs who rent Web space are on fast connections. But suppose you're an avid reader of the alt.binaries.pictures.stonehenge newsgroup, and have faithfully downloaded all the 145 pictures in the "Stonehenge: Dawn to Dusk" series. After investing much hair-pulling in decoding them, you decide to be of service to your fellow Web surfers by offering the pictures on your Web site. So, you post an announcement that says "Hey, come get the entire series -- all decoded," and your ISP's two T-1 lines are completely swamped by requests! What to do?

The program in this month's column allows you to provide a Web directory limited in bandwidth by artificially decelerating the number of bytes sent over a limited period of time. Thus, you can ensure that your Stonehenge pictures never steal more than the equivalent of, say, a single 28.8-kbps modem, even if 24 druids are hitting your site simultaneously. (One ISP I use limits general users to 20MB per day, so I could keep it down to 200 bytes per second and be assured that I'd never exceed the maximum number, although this would be ridiculously low.)

You could also use this script to see what your Web site looks like when viewed at slow speeds, even though you have a direct connection to your machine.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2