servers.conf¶
- servers.conf
- Backend Server Configuration
- Option Descriptions (todo)
- Backup and Load Balancing Levels and Policies
- Local Dreader
Backend Server Configuration¶
All backend servers are configured in the servers.conf. As with most other configuration files there is one special server which is called default. The default server contains no Hostname or Groups statements, but contains all other possibly needed parameters.
The following example demonstrates the most basic configuration. A binaries server and a text server. The textserver also has the descriptions and knows about active.times.
server default Port 119 Timeout 300 Descriptions False ActiveTimes False Type Spool Policy Single SplitList False end server bunnies Groups *bin* Hostname bin.example.com end server text Groups * Hostname text.example.com end server active Groups *.* Hostname text.example.com Descriptions True ActiveTimes True end
Please make sure that you retrieve active.times and newsgroups information from atleast one server. This must be done by setting the options activetimes and descriptions to true. Also note that the most significant servers are listed at the bottom. If you have servers for single newsgroups or patterns thereof put them at the top.
Option Descriptions (todo)¶
SplitList If you have a backend server which doesn't support the LIST ACTIVE command with multiple patterns, set this option to True so multiple LIST commands will be done for each part of the pattern. For Diablo put it to 1, for INN put it to 0.
Backup and Load Balancing Levels and Policies¶
You can configure backup or balanced servers by using the same Groups values. Policy can be either backup or balance.
The backup and balancing checks take place upon connecting to a group. Only when a group is selected nntpswitch checks if we need to (re)connect to a different backend server. A backup server is used when the primary server fails, failure is tested on every connect and the primary server will be retried first at all times. The balancing takes place by just selecting a different server on each connect. Only if one of the balancing servers failes, nntpswitch just uses the backup mechanism to find another server.
An example of 2 backup servers. Each connection will try "movies1" first. In case of some connection or NNTP error, the next server "movies2" is tried.
server bin1 Hostname binaries1.local Groups * Policy backup end server bin2 Hostname binaries2.local Groups * Policy backup end
An example of 2 load-balanced servers. Each connection to the backend server will connect to the other one.
server bin1 Hostname binaries1.local Groups *bin* Policy balance end server bin2 Hostname binaries2.local Groups *bin* Policy balance end
Note in the above examples, the server "movies1" is most likely used for updating the groups with the updategroups command.
Local Dreader¶
If you have a diablo based setup with hash based spools and standalone overview servers, you can use a local dreader to handle server connections. When someone issues a group command and retrieves an article, nntpswitch will connect to the spool server which matches the pattern. However if someone requests an article by Message-ID nntpswitch loops to all spoolservers to find the message-id. If you have a local dreader running on a different port you can use that dreader to handle message-id lookups. See also the LocalDreader nntpswitch.conf option
To setup a local dreader handling message-id's but no groups configure it like this:
server localhost
hostname 127.0.0.1
groups !*
port 120
policy single
end