Skip to content

Commit 4dae2a3

Browse files
committed
[#3299] fix parked-packet-limit mentions in ARM
- move PPL section to general hooks section - remove note that PPL is used only for HA - add PPL section in RADIUS - add PPL reference in ping-check - change values in doc/examples to resemble defaults
1 parent 2cb3999 commit 4dae2a3

File tree

8 files changed

+106
-70
lines changed

8 files changed

+106
-70
lines changed

doc/examples/kea4/all-keys-netconf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@
572572
// This value limits the number of packets that can be held pending
573573
// the updates. In times of heavy client traffic, this value can keep
574574
// kea-dhcp4 from building an insurmountable backlog of updates.
575-
"parked-packet-limit": 128,
575+
"parked-packet-limit": 256,
576576

577577
// List of global DHCP options that the Kea DHCPv4 server assigns to
578578
// clients.

doc/examples/kea4/all-keys.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@
594594
// This value limits the number of packets that can be held pending
595595
// the updates. In times of heavy client traffic, this value can keep
596596
// kea-dhcp4 from building an insurmountable backlog of updates.
597-
"parked-packet-limit": 128,
597+
"parked-packet-limit": 256,
598598

599599
// List of global DHCP options that the Kea DHCPv4 server assigns to
600600
// clients.

doc/examples/kea6/all-keys-netconf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@
564564
// be held pending the updates. In times of heavy client traffic,
565565
// this value can keep kea-dhcp6 from building an insurmountable
566566
// backlog of updates.
567-
"parked-packet-limit": 128,
567+
"parked-packet-limit": 256,
568568

569569
// Global (default) value of the preferred lifetime.
570570
"preferred-lifetime": 50,

doc/examples/kea6/all-keys.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@
586586
// be held pending the updates. In times of heavy client traffic,
587587
// this value can keep kea-dhcp6 from building an insurmountable
588588
// backlog of updates.
589-
"parked-packet-limit": 128,
589+
"parked-packet-limit": 256,
590590

591591
// Global (default) value of the preferred lifetime.
592592
"preferred-lifetime": 50,

doc/sphinx/arm/ext-radius.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,20 @@ Somewhat tangential to lease allocation, and not shown in the diagrams above,
473473
is the ``command_processed`` callout, which sends Accounting-Request messages
474474
when a lease command is received.
475475

476+
.. _radius-parked-packet-limit:
477+
478+
Parked-Packet Limit
479+
~~~~~~~~~~~~~~~~~~~
480+
481+
Refer to :ref:`parked-packet-limit` for a basic introduction to packet parking.
482+
483+
The RADIUS hook library makes use of this mechanism. To allow for asynchronous
484+
communication between Kea and the RADIUS server and concurrent processing of
485+
DHCP packets by the Kea server, the DHCP request is parked, before the access
486+
request is sent on the subnet select callout. When the access response becomes
487+
available to the Kea DHCP server, the request is unparked, and the server
488+
continues processing on it.
489+
476490
.. _radius-differences:
477491

478492
Differences Between RADIUS Hook Libraries Prior To 2.4.0 and As Of 2.6.0

doc/sphinx/arm/hooks-ha.rst

Lines changed: 6 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,67 +1742,16 @@ four threads for the client.
17421742
Parked-Packet Limit
17431743
~~~~~~~~~~~~~~~~~~~
17441744

1745-
Kea servers contain a mechanism by which the response to a client packet may
1746-
be held, pending completion of hook library work. We refer to this as "parking"
1747-
the packet. The HA hook library makes use of this mechanism. When an HA server
1748-
needs to send a lease update to its peer(s) to notify it of the change to the
1749-
lease, it will "park" the client response until the peer acknowledges the lease
1750-
update. At that point, the server will "unpark" the response and send it to the
1745+
Refer to :ref:`parked-packet-limit` for a basic introduction to packet parking.
1746+
1747+
The HA hook library makes use of this mechanism. When an HA server
1748+
needs to send a lease update to its peers to notify them of the change to the
1749+
lease, it will park the client response until the peers acknowledge the lease
1750+
update. At that point, the server will unpark the response and send it to the
17511751
client. This applies to client queries which cause lease changes, such as
17521752
DHCPREQUEST for DHCPv4 and Request, Renew, and Rebind for DHCPv6. It does not
17531753
apply to DHPCDISCOVERs (v4) or Solicits (v6).
17541754

1755-
There is a global parameter, ``parked-packet-limit``, that may be used to limit
1756-
the number of responses that may be parked at any given time. This acts as a
1757-
form of congestion handling and protects the server from being swamped when the
1758-
volume of client queries is outpacing the server's ability to respond. Once the
1759-
limit is reached, the server emits a log and drops any new responses until
1760-
parking spaces are available.
1761-
1762-
In general, smaller values for the parking lot limit are likely to cause more
1763-
drops but with shorter response times. Larger values are likely to result in
1764-
fewer drops but with longer response times. Currently, the default value for
1765-
``parked-packet-limit`` is 256.
1766-
1767-
.. warning::
1768-
1769-
Using too small a value may result in an unnecessarily high drop rate, while
1770-
using too large a value may lead to response times that are simply too long
1771-
to be useful. A value of 0, while allowed, disables the limit altogether, but
1772-
this is highly discouraged as it may lead to Kea servers becoming
1773-
unresponsive to clients. Choosing the best value is very site-specific; we
1774-
recommend users initially leave it at the default value of 256 and observe
1775-
how the system behaves over time with varying load conditions.
1776-
1777-
::
1778-
1779-
"Dhcp6": {
1780-
// Limit the number of concurrently parked packets to 128.
1781-
"parked-packet-limit": 128,
1782-
"hooks-libraries": [
1783-
{
1784-
"library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
1785-
"parameters": { }
1786-
},
1787-
{
1788-
"library": "/usr/lib/kea/hooks/libdhcp_ha.so",
1789-
"parameters": {
1790-
"high-availability": [ {
1791-
"this-server-name": "server1",
1792-
...
1793-
} ]
1794-
}
1795-
},
1796-
...
1797-
],
1798-
...
1799-
}
1800-
1801-
.. note::
1802-
1803-
While ``parked-packet-limit`` is not specifically tied to HA, currently HA
1804-
is the only ISC hook that employs packet parking.
1805-
18061755
.. _ha-maintenance:
18071756

18081757
Controlled Shutdown and Maintenance of DHCP Servers

doc/sphinx/arm/hooks-ping-check.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ offering a lease to client if all of the following conditions are true:
5050
5. Any of the following are true:
5151

5252
a. This is the first offer of this lease to this client. This check
53-
can only be done if `offer-lifetime` is greater than zero (i.e. temporary
54-
allocation on DHCPDISCOVER is enabled). If `offer-lifetime` is zero
53+
can only be done if ``offer-lifetime`` is greater than zero (i.e. temporary
54+
allocation on DHCPDISCOVER is enabled). If ``offer-lifetime`` is zero
5555
ping checks are done for every DHCPOFFER as the server has no way to
5656
know it has made prior offers.
5757

5858
b. The lease is being offered to a client other than its previous owner.
5959

6060
c. The lease is being offered to its previous owner and more than a
61-
configurable number of seconds, `ping-cltt-secs`, have elapsed since
61+
configurable number of seconds, ``ping-cltt-secs``, have elapsed since
6262
CLTT of the original lease.
6363

6464
When the ping check library is loaded, in response to a DHCPDISCOVER the
@@ -68,7 +68,8 @@ When the ping check library is loaded, in response to a DHCPDISCOVER the
6868
construct a DHCPOFFER.
6969

7070
2. Park the DHCPOFFER and request a ping-check from the ping-check hook
71-
library via its `lease4_offer` callout.
71+
library via its ``lease4_offer`` callout. Refer to :ref:`parked-packet-limit` for
72+
a basic introduction to packet parking.
7273

7374
3. The callout will test conditions described above. If they are not
7475
satisfied it will return without conducting a check, and the server
@@ -114,17 +115,17 @@ Configuration
114115
The ping-check hook library currently supports the following configuration parameters
115116
that may be set at the global and subnet levels. Subnet values override global values.
116117

117-
- `enable-ping-check` - Enables or disables ping checking at a given scope.
118+
- ``enable-ping-check`` - Enables or disables ping checking at a given scope.
118119

119-
- `min-ping-requests` - The minimum number of ECHO REQUESTs sent without receiving a reply needed to declare an address available. The default is 1, it must be greater than zero.
120+
- ``min-ping-requests`` - The minimum number of ECHO REQUESTs sent without receiving a reply needed to declare an address available. The default is 1, it must be greater than zero.
120121

121-
- `reply-timeout` - The maximum amount of time to wait for a reply to a single ECHO REQUEST. Specified in milliseconds, it must be greater than zero, it defaults to 100.
122+
- ``reply-timeout`` - The maximum amount of time to wait for a reply to a single ECHO REQUEST. Specified in milliseconds, it must be greater than zero, it defaults to 100.
122123

123-
- `ping-cltt-secs` - The number of seconds that must elapse after the lease's CLTT before a ping check will be conducted when the client is the lease's previous owner. The default value is sixty seconds.
124+
- ``ping-cltt-secs`` - The number of seconds that must elapse after the lease's CLTT before a ping check will be conducted when the client is the lease's previous owner. The default value is sixty seconds.
124125

125126
The following parameter is only supported at the global level:
126127

127-
- `ping-channel-threads` - In multi-threaded mode, this is the number of threads in the channel's thread pool. The default is 0 which instructs the library to use the same number of threads as Kea core. The value is ignored if given when Kea is in single-threaded mode.
128+
- ``ping-channel-threads`` - In multi-threaded mode, this is the number of threads in the channel's thread pool. The default is 0 which instructs the library to use the same number of threads as Kea core. The value is ignored if given when Kea is in single-threaded mode.
128129

129130
The following configuration excerpt illustrates global level configuration:
130131

doc/sphinx/arm/hooks.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,78 @@ The Limits hook uses user-context in classes and subnets to set parameters. For
364364
}
365365
}
366366
367+
.. _parked-packet-limit:
368+
369+
Parked-Packet Limit
370+
~~~~~~~~~~~~~~~~~~~
371+
372+
Kea servers contain a mechanism by which the response to a client packet may
373+
be held, pending completion of hook library work. We refer to this as parking
374+
the packet. When work is ready to continue, the server will unpark the response
375+
and continue processing.
376+
377+
There is a global parameter, ``parked-packet-limit``, that may be used to limit
378+
the number of responses that may be parked at any given time. This acts as a
379+
form of congestion handling and protects the server from being swamped when the
380+
volume of client queries is outpacing the server's ability to respond. Once the
381+
limit is reached, the server emits a log and drops any new responses until
382+
parking spaces are available.
383+
384+
In general, smaller values for the parking lot limit are likely to cause more
385+
drops but with shorter response times. Larger values are likely to result in
386+
fewer drops but with longer response times. Currently, the default value for
387+
``parked-packet-limit`` is 256.
388+
389+
.. warning::
390+
391+
Using too small a value may result in an unnecessarily high drop rate, while
392+
using too large a value may lead to response times that are simply too long
393+
to be useful. A value of 0, while allowed, disables the limit altogether, but
394+
this is highly discouraged as it may lead to Kea servers becoming
395+
unresponsive to clients. Choosing the best value is very site-specific; we
396+
recommend users initially leave it at the default value of 256 and observe
397+
how the system behaves over time with varying load conditions.
398+
399+
Here is an example of the global parameter used with ischooklib:`libdhcp_ha.so`.
400+
It lowers the number of concurrently parked packets to 128.
401+
402+
.. code-block:: json
403+
404+
{
405+
"Dhcp6": {
406+
// Limit the number of concurrently parked packets to 128.
407+
"parked-packet-limit": 128
408+
"hooks-libraries": [
409+
{
410+
"library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so"
411+
},
412+
{
413+
"library": "/usr/lib/kea/hooks/libdhcp_ha.so",
414+
"parameters": {
415+
"high-availability": [
416+
{
417+
"mode": "hot-standby",
418+
"peers": [
419+
{
420+
"name": "server1",
421+
"role": "primary",
422+
"url": "http://127.0.0.1:8080/"
423+
},
424+
{
425+
"name": "server2",
426+
"role": "standby",
427+
"url": "http://127.0.0.1:8088/"
428+
}
429+
],
430+
"this-server-name": "server1"
431+
}
432+
]
433+
}
434+
}
435+
],
436+
}
437+
}
438+
367439
Available Hook Libraries
368440
========================
369441

0 commit comments

Comments
 (0)