Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - constant cvs_version = "$Id: configuration.pike,v 1.383 2000/10/04 21:29:20 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.384 2000/10/06 15:12:37 mast Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>         #define CATCH(P,X) do{mixed e;if(e=catch{X;})report_error("While "+P+"\n"+describe_backtrace(e));}while(0)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:2758:    "\n\n", query_name(), (gethrtime()-start_time)/1000000.0);   }      DataCache datacache;      static void create(string config)   {    name=config;       // for now only theese two. In the future there might be more variables. -  defvar( "data_cache_size", 2048, DLOCALE(274, "Data Cache:Cache size"), +  defvar( "data_cache_size", 2048, DLOCALE(274, "Cache:Cache size"),    TYPE_INT,    DLOCALE(275, "The size of the data cache used to speed up requests "    "for commonly requested files, in KBytes"));    -  defvar( "data_cache_file_max_size", 50, DLOCALE(276, "Data Cache:Max file size"), +  defvar( "data_cache_file_max_size", 50, DLOCALE(276, "Cache:Max file size"),    TYPE_INT,    DLOCALE(277, "The maximum size of a file that is to be considered for "    "the cache"));          defvar("default_server", 0, DLOCALE(20, "Default site"),    TYPE_FLAG,    DLOCALE(21, "If true, this site will be selected in preference of "    "other sites when virtual hosting is used and no host "    "header is supplied, or the supplied host header does not "
Roxen.git/server/base_server/configuration.pike:2885:    DLOCALE(41, "Some modules may want to create links to internal "    "resources. This setting configures an internally handled "    "location that can be used for such purposes. Simply select "    "a location that you are not likely to use for regular "    "resources."));          // Throttling-related variables       defvar("throttle", 0, -  DLOCALE(42, "Bandwidth Throttling: Server: Enabled"),TYPE_FLAG, +  DLOCALE(42, "Throttling: Server: Enabled"),TYPE_FLAG,    DLOCALE(43, "If set, per-server bandwidth throttling will be enabled. "    "It will allow you to limit the total available bandwidth for "    "this site.<br />Bandwidth is assigned using a Token Bucket. "    "The principle under which it works is: for each byte we send we use a token. "    "Tokens are added to a repository at a constant rate. When there's not enough, "    "we can't transmit. When there's too many, they \"spill\" and are lost."));    //TODO: move this explanation somewhere on the website and just put a link.       defvar("throttle_fill_rate", 102400, -  DLOCALE(44, "Bandwidth Throttling: Server: Average available bandwidth"), +  DLOCALE(44, "Throttling: Server: Average available bandwidth"),    TYPE_INT,    DLOCALE(45, "This is the average bandwidth available to this site in "    "bytes/sec (the bucket \"fill rate\")."),    0, arent_we_throttling_server);       defvar("throttle_bucket_depth", 1024000, -  DLOCALE(46, "Bandwidth Throttling: Server: Bucket Depth"), TYPE_INT, +  DLOCALE(46, "Throttling: Server: Bucket Depth"), TYPE_INT,    DLOCALE(47, "This is the maximum depth of the bucket. After a long enough period "    "of inactivity, a request will get this many unthrottled bytes of data, before "    "throttling kicks back in.<br>Set equal to the Fill Rate in order not to allow "    "any data bursts. This value determines the length of the time over which the "    "bandwidth is averaged."), 0, arent_we_throttling_server);       defvar("throttle_min_grant", 1300, -  DLOCALE(48, "Bandwidth Throttling: Server: Minimum Grant"), TYPE_INT, +  DLOCALE(48, "Throttling: Server: Minimum Grant"), TYPE_INT,    DLOCALE(49, "When the bandwidth availability is below this value, connections will "    "be delayed rather than granted minimal amounts of bandwidth. The purpose "    "is to avoid sending too small packets (which would increase the IP overhead)."),    0, arent_we_throttling_server);       defvar("throttle_max_grant", 14900, -  DLOCALE(50, "Bandwidth Throttling: Server: Maximum Grant"), TYPE_INT, +  DLOCALE(50, "Throttling: Server: Maximum Grant"), TYPE_INT,    DLOCALE(51, "This is the maximum number of bytes assigned in a single request "    "to a connection. Keeping this number low will share bandwidth more evenly "    "among the pending connections, but keeping it too low will increase IP "    "overhead and (marginally) CPU usage. You'll want to set it just a tiny "    "bit lower than any integer multiple of your network's MTU (typically 1500 "    "for ethernet)."), 0, arent_we_throttling_server);       defvar("req_throttle", 0, -  DLOCALE(52, "Bandwidth Throttling: Request: Enabled"), TYPE_FLAG, +  DLOCALE(52, "Throttling: Request: Enabled"), TYPE_FLAG,    DLOCALE(53, "If set, per-request bandwidth throttling will be enabled.")    );       defvar("req_throttle_min", 1024, -  DLOCALE(54, "Bandwidth Throttling: Request: Minimum guarranteed bandwidth"), +  DLOCALE(54, "Throttling: Request: Minimum guarranteed bandwidth"),    TYPE_INT,    DLOCALE(55, "The maximum bandwidth each connection (in bytes/sec) can use is determined "    "combining a number of modules. But doing so can lead to too small "    "or even negative bandwidths for particularly unlucky requests. This variable "    "guarantees a minimum bandwidth for each request."),    0, arent_we_throttling_request);       defvar("req_throttle_depth_mult", 60.0, -  DLOCALE(56, "Bandwidth Throttling: Request: Bucket Depth Multiplier"), +  DLOCALE(56, "Throttling: Request: Bucket Depth Multiplier"),    TYPE_FLOAT,    DLOCALE(57, "The average bandwidth available for each request will be determined by "    "the modules combination. The bucket depth will be determined multiplying "    "the rate by this factor."),    0, arent_we_throttling_request);       defvar("ZNoSuchFile", #"   <html><head>   <title>404 - Page not found</title>   </head>
Roxen.git/server/base_server/configuration.pike:2987:   <a href=\"&client.referrer;\">referring</a>   </if><else>   referring   </else>   page.      </blockquote>   </font>   </body>   ", -  DLOCALE(58, "Messages: No such file"),TYPE_TEXT_FIELD, +  DLOCALE(58, "No such file message"),TYPE_TEXT_FIELD,    DLOCALE(59, "What to return when there is no resource or file "    "available at a certain location."));       definvisvar( "no_delayed_load", 0, TYPE_FLAG );       setvars( retrieve("spider#0", this_object()) );       if (query("throttle"))    {    throttler=.throttler();