Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:config:vhost-level_bw_throttling [2014/09/26 19:23]
Michael Armstrong [Virtual Host-Level Bandwidth Throttling]
litespeed_wiki:config:vhost-level_bw_throttling [2019/06/05 19:45] (current)
Lisa Clarke [VhostBandwidthLimit] Proofreading
Line 3: Line 3:
 LiteSpeed Web Server version 5.0 introduces virtual host-level bandwidth throttling. This can be thought of as an extension of LSWS's [[http://​www.litespeedtech.com/​docs/​webserver/​config/​security#​perClientConnLimit|Per Client Throttling settings]], which allow you to control the amount of stress a single IP can put on your server. Virtual host-level bandwidth throttling allows you to customize bandwidth throttling, in Apache configs, for particular virtual hosts. You can now set up stricter settings for sites that you know are targets or more lenient settings for sites that might require a lot of bandwidth going to one IP. (This has been available for some time in vhosts with LSWS-native configs.) It also allows for throttling bandwidth by file type and size. LiteSpeed Web Server version 5.0 introduces virtual host-level bandwidth throttling. This can be thought of as an extension of LSWS's [[http://​www.litespeedtech.com/​docs/​webserver/​config/​security#​perClientConnLimit|Per Client Throttling settings]], which allow you to control the amount of stress a single IP can put on your server. Virtual host-level bandwidth throttling allows you to customize bandwidth throttling, in Apache configs, for particular virtual hosts. You can now set up stricter settings for sites that you know are targets or more lenient settings for sites that might require a lot of bandwidth going to one IP. (This has been available for some time in vhosts with LSWS-native configs.) It also allows for throttling bandwidth by file type and size.
  
-====== ​Configuraton ​======+====== ​Configuration ​======
  
 LSWS's implementation of this bandwidth throttling follows syntax similar to that used by Apache’s [[http://​bwmod.sourceforge.net/​files/​mod_bw-0.7.txt|mod_bw]]. Bandwidth throttling directives can only be placed in virtual host configuration file, not an .htaccess file. LSWS's implementation of this bandwidth throttling follows syntax similar to that used by Apache’s [[http://​bwmod.sourceforge.net/​files/​mod_bw-0.7.txt|mod_bw]]. Bandwidth throttling directives can only be placed in virtual host configuration file, not an .htaccess file.
Line 10: Line 10:
  
 ===== Directives ===== ===== Directives =====
 +
 +==== VhostBandwidthLimit ====
 +
 +Syntax:
 +
 +  VhostBandwidthLimit [Speed in bytes/s]
 +
 +The ''​VhostBandwidthLimit''​ directive controls the amount of bandwidth allotted to a virtual host regardless of the number of concurrent visitors. It can only be set at the virtual host level in the Apache configuration file or through Apache-style config in native LSWS configuration. ​
 +
 +It takes 1 parameter:
 +
 +  * ''​Speed''​ indicates the total speed available to the virtual host. If ''​Speed''​ is less than ''​4097'',​ there is no limit.
  
 ==== BandWidth ==== ==== BandWidth ====
Line 19: Line 31:
 The BandWidth directive controls the amount of bandwidth allotted to specific users. It takes 2 parameters: The BandWidth directive controls the amount of bandwidth allotted to specific users. It takes 2 parameters:
  
-  * ''​Origin''​ is the origin of the connections. It can a single IP address, a set of IP addresses, a network mask, or "all".+  * ''​Origin''​ is the origin of the connections. It can be a single IP address, a set of IP addresses, a network mask, or ''​all''​.
   * ''​Speed''​ indicates the total speed available to the ''​Origin''​. If ''​Speed''​ is ''​0'',​ there is no limit.   * ''​Speed''​ indicates the total speed available to the ''​Origin''​. If ''​Speed''​ is ''​0'',​ there is no limit.
  
Line 43: Line 55:
   * ''​Speed''​ indicates the maximum speed at which these files can be served.   * ''​Speed''​ indicates the maximum speed at which these files can be served.
  
 +==== MaxConnPerClient ====
 +
 +Syntax:
 +
 +  MaxConnPerClient <​limit_for_connections>​
 +
 +The MaxConnPerClient directive allows you to configure the maximum concurrent connections from one IP.
 +  * ''​limit_for_connections''​ set the connection limit.
 +===== Examples =====
 +
 +  BandWidth all 102400
 +  ​
 +The above setting would limit the total bandwidth allowed to this virtual host to 100KB/s
 +
 +  BandWidth all 50000
 +  MinBandWidth all -1
 +  LargeFileLimit .avi 500 10240
  
 +The above settings limit each client to 50KB/s with no maximum total bandwidth. .avi files of 500KB or greater, though, are limited to 10KB/s.
  • Admin
  • Last modified: 2014/09/26 19:23
  • by Michael Armstrong