Throttle Module

Having a full-featured site with every possible bell and whistle is nice and makes life fun, but it is also important that the site be able to withstand sudden spikes of traffic. Every feature that you enable increases the cost of loading pages, in terms of CPU cycles and database queries. The more work your server has to do to load a page, the fewer pages it will be able to serve per second.

If you or one of your users happens to write a fantastic article that gets mentioned on a popular site like Boing Boing ( or Slashdot (, you will start getting enormous amounts of traffic. (Drupal administrators will tell you that they are thankful for the Throttle module when Slashdotting does occur.) Alternatively, if someone decides to launch a denial-of-service attack on your site, the server may be faced with hundreds or thousands of requests a second. The Throttle module exists solely to prepare for such situations. You can use it to decide, in times of exceptionally high traffic, which blocks or modules should be automatically shut off or throttled in order to be able to serve more pages per second and better keep up with the load.

Two statistics can be used as a trigger for the Throttle module: the number of anonymous users and the number of authenticated users. The Throttle module monitors these two types of users by periodically looking in the sessions table and counting each type of user. If either count exceeds the limit you set, Drupal turns on the throttle, and throttled blocks and modules are no longer loaded. As soon as the number of users falls below the specified limits, Drupal turns off the throttle.

0 0

Post a comment