[Kea-users] HA hot-standby query role
Arne Baeumler
arne+kea at br0tkasten.de
Wed Oct 24 15:07:39 UTC 2018
Hi,
we are about to setup two kea dhcp servers running libdhcp_ha in
hot-standby mode (cfg. ha-library config below).
{
"library":
"/opt/kea-latest/lib/hooks/libdhcp_ha.so",
"parameters": {
"high-availability": [ {
"this-server-name":
"dhcp-hsi4.uni",
"mode": "hot-standby",
"heartbeat-delay":
10000,
"max-response-delay":
60000,
"max-unacked-clients":
0,
"send-lease-updates":
false,
"sync-leases": false,
"peers": [
{
"name":
"dhcp-hsi4.rz2",
"url":
"http://172.16.51.153:8080/",
"role":
"primary",
"auto-failover": true
},
{
"name":
"dhcp-hsi4.uni",
"url":
"http://172.16.51.154:8080/",
"role":
"standby",
"auto-failover": true
}
]
} ]
}
}
According to our tests, lease-updates using kea's HA protocol do not
perform very well with >70 requests/sec.
Therefore we configured lease replication in our db backend
(postgresql).
To get synchronization direction correct (sync leases from active ->
standby) we need to query the state/role of both servers.
The API command ha-heartbeat returns state: 'hot-standby' on both
servers.
$ /usr/bin/curl -s -X POST -H "Content-Type: application/json" -d '{
"command": "ha-heartbeat", "service": [ "dhcp4" ] }'
http://172.16.51.154:8080/ | jq -r '.'
[
{
"arguments": {
"date-time": "Wed, 24 Oct 2018 14:18:39 GMT",
"state": "hot-standby"
},
"result": 0,
"text": "HA peer status returned."
}
]
Is there an API call returning wether the server is actually processing
(role: primary) or ignoring (role: standby) dhcp messages?
--
best regards,
Arne
More information about the Kea-users
mailing list