"sync-timeout": 60000,
// To not experience performance degradation when the Kea server is
// processing packets on multiple threads, the High Availablility module
- // must be configured in a similar way.
+ // must have multi-threading enabled.
"multi-threading": {
"enable-multi-threading": true,
// When running in MT mode, the dedicated listener is used to handle
// lease updates.
"http-dedicated-listener": true,
// The number of threads used to handle incomming requests.
- "http-listener-threads": 4,
+ // A value of 0 instructs the server to use the same number of
+ // threads that the Kea core is using for DHCP multi-threading.
+ "http-listener-threads": 0,
// The number of threads used to handle outgoing requests.
- "http-client-threads": 4
+ // A value of 0 instructs the server to use the same number of
+ // threads that the Kea core is using for DHCP multi-threading.
+ "http-client-threads": 0
},
"peers": [
// This is the configuration of this server instance.
"sync-timeout": 60000,
// To not experience performance degradation when the Kea server is
// processing packets on multiple threads, the High Availablility module
- // must be configured in a similar way.
+ // must have multi-threading enabled.
"multi-threading": {
"enable-multi-threading": true,
// When running in MT mode, the dedicated listener is used to handle
// lease updates.
"http-dedicated-listener": true,
// The number of threads used to handle incomming requests.
- "http-listener-threads": 4,
+ // A value of 0 instructs the server to use the same number of
+ // threads that the Kea core is using for DHCP multi-threading.
+ "http-listener-threads": 0,
// The number of threads used to handle outgoing requests.
- "http-client-threads": 4
+ // A value of 0 instructs the server to use the same number of
+ // threads that the Kea core is using for DHCP multi-threading.
+ "http-client-threads": 0
},
"peers": [
// This is the configuration of the HA peer.
// further. The default value is 60000ms (60 seconds).
"sync-timeout": 60000,
// Multi-threading parameters.
+ // To not experience performance degradation when the Kea server is
+ // processing packets on multiple threads, the High Availablility module
+ // must have multi-threading enabled.
"multi-threading": {
"enable-multi-threading": true,
// When running in MT mode, the dedicated listener is used to handle
// lease updates.
"http-dedicated-listener": true,
// The number of threads used to handle incomming requests.
- "http-listener-threads": 4,
+ // A value of 0 instructs the server to use the same number of
+ // threads that the Kea core is using for DHCP multi-threading.
+ "http-listener-threads": 0,
// The number of threads used to handle outgoing requests.
- "http-client-threads": 4
+ // A value of 0 instructs the server to use the same number of
+ // threads that the Kea core is using for DHCP multi-threading.
+ "http-client-threads": 0
},
"peers": [
// This is the configuration of this server instance.
// further. The default value is 60000ms (60 seconds).
"sync-timeout": 60000,
// Multi-threading parameters.
+ // To not experience performance degradation when the Kea server is
+ // processing packets on multiple threads, the High Availablility module
+ // must have multi-threading enabled.
"multi-threading": {
"enable-multi-threading": true,
// When running in MT mode, the dedicated listener is used to handle
// lease updates.
"http-dedicated-listener": true,
// The number of threads used to handle incomming requests.
- "http-listener-threads": 4,
+ // A value of 0 instructs the server to use the same number of
+ // threads that the Kea core is using for DHCP multi-threading.
+ "http-listener-threads": 0,
// The number of threads used to handle outgoing requests.
- "http-client-threads": 4
+ // A value of 0 instructs the server to use the same number of
+ // threads that the Kea core is using for DHCP multi-threading.
+ "http-client-threads": 0
},
"peers": [
// This is the configuration of the primary server.
}
}
- if (enable_multi_threading_) {
- // We get it from staging because applying the DHCP multi-threading configuration
- // occurs after library loading during the (re)configuration process.
- auto mcfg = CfgMgr::instance().getStagingCfg()->getDHCPMultiThreading();
- bool dhcp_mt_enabled = false;
- uint32_t dhcp_threads = 0;
- uint32_t dummy_queue_size = 0;
- CfgMultiThreading::extract(mcfg, dhcp_mt_enabled, dhcp_threads, dummy_queue_size);
+ // We get it from staging because applying the DHCP multi-threading configuration
+ // occurs after library loading during the (re)configuration process.
+ auto mcfg = CfgMgr::instance().getStagingCfg()->getDHCPMultiThreading();
+ bool dhcp_mt_enabled = false;
+ uint32_t dhcp_threads = 0;
+ uint32_t dummy_queue_size = 0;
+ CfgMultiThreading::extract(mcfg, dhcp_mt_enabled, dhcp_threads, dummy_queue_size);
+ if (enable_multi_threading_) {
if (!dhcp_mt_enabled) {
// HA+MT requires DHCP multi-threading.
LOG_INFO(ha_logger, HA_CONFIG_DHCP_MT_DISABLED);
if (http_client_threads_ == 0) {
http_client_threads_ = dhcp_threads;
}
+ } else {
+ if (dhcp_mt_enabled) {
+ // DHCP multi-threading requires HA+MT for optimal performance.
+ LOG_WARN(ha_logger, HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED);
+ return;
+ }
}
}
extern const isc::log::MessageID HA_CONFIGURATION_SUCCESSFUL = "HA_CONFIGURATION_SUCCESSFUL";
extern const isc::log::MessageID HA_CONFIG_AUTO_FAILOVER_DISABLED = "HA_CONFIG_AUTO_FAILOVER_DISABLED";
extern const isc::log::MessageID HA_CONFIG_DHCP_MT_DISABLED = "HA_CONFIG_DHCP_MT_DISABLED";
+extern const isc::log::MessageID HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED = "HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED";
extern const isc::log::MessageID HA_CONFIG_LEASE_SYNCING_DISABLED = "HA_CONFIG_LEASE_SYNCING_DISABLED";
extern const isc::log::MessageID HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER = "HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER";
extern const isc::log::MessageID HA_CONFIG_LEASE_UPDATES_AND_SYNCING_DIFFER = "HA_CONFIG_LEASE_UPDATES_AND_SYNCING_DIFFER";
"HA_CONFIGURATION_SUCCESSFUL", "HA hook library has been successfully configured",
"HA_CONFIG_AUTO_FAILOVER_DISABLED", "auto-failover disabled for %1",
"HA_CONFIG_DHCP_MT_DISABLED", "HA multi-threading has been disabled, it cannot be enabled when Kea global multi-threading is disabled",
+ "HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED", "HA multi-threading is disabled while Kea global multi-threading is enabled which most likely cause performance degradation.",
"HA_CONFIG_LEASE_SYNCING_DISABLED", "lease database synchronization between HA servers is disabled",
"HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER", "bypassing SYNCING state because lease database synchronization is administratively disabled",
"HA_CONFIG_LEASE_UPDATES_AND_SYNCING_DIFFER", "unusual configuration where \"send-lease-updates\": %1 and \"sync-leases\": %2",
extern const isc::log::MessageID HA_CONFIGURATION_SUCCESSFUL;
extern const isc::log::MessageID HA_CONFIG_AUTO_FAILOVER_DISABLED;
extern const isc::log::MessageID HA_CONFIG_DHCP_MT_DISABLED;
+extern const isc::log::MessageID HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED;
extern const isc::log::MessageID HA_CONFIG_LEASE_SYNCING_DISABLED;
extern const isc::log::MessageID HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER;
extern const isc::log::MessageID HA_CONFIG_LEASE_UPDATES_AND_SYNCING_DIFFER;
This informational message is issued when HA configuration has enabled
multi-threading while Kea global configuration has multi-threading disabled.
+% HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED HA multi-threading is disabled while Kea global multi-threading is enabled which most likely cause performance degradation.
+This warning message is issued when HA configuration has disabled
+multi-threading while Kea global configuration has multi-threading enabled.
+This will likely cause performance degradation.
+
% HA_CONFIG_LEASE_SYNCING_DISABLED lease database synchronization between HA servers is disabled
This warning message is issued when the lease database synchronization is
administratively disabled. This is valid configuration if the leases are