The <rate/> Tag
The <rate/> tag affords us a
sort of connection throttle by allowing us to monitor the rate at which
incoming connections are made and to put a hold on further connections
if the rate is reached.
The rate is calculated to be a number of connection attempts—from a single
IP address—within a certain amount of time. We can see these two components
of the rate formula as attributes of the
<rate/> tag itself:
<rate points="5" time="25"/>
This means acceptance of incoming connections from an individual IP address
will be stopped if more than five connection attempts (points)
are made in the space of 25 seconds (time).
The “rating” (the throttling of connection attempts) will be restored at the end of the period defined (25 seconds in this case).
The effect of a <rate/> tag
in this io section is serverwide; all socket connections (for example, those
of c2s and s2s)
can be rate-limited. If there is no explicit
<rate/> specification in a
particular service that listens on a socket for connections, then the
specification in this io section is used.
If no <rate/> tag is specified
in this io section, then the server defaults are used—these are actually
the same as what’s explicitly specified here.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access