Batch lease insertion for database lease backend
The DHCP service might receive thousands of requests per second under peak loads. If each granted lease executes a COMMIT in the database, object contention may occur in rows, tables or indexes. A batch insert provides a mechanism where the DHCP delays lease insertion for a configurable period of time (in seconds) and then inserts leases in batches using a single database transaction. To avoid data loss in case the DHCP service crashes all queued leases should be persisted to a local on-disk database for a configurable period of time, for example 5 seconds.
This feature should also support configuring the max number of database connections and the number of threads Kea should use to insert leases in the database.
# kea config batch lease insertion batch-lease-insertion-interval-ms = 5000 # if database enabled batch-lease-insertion-db-connections = 5 batch-lease-insertion-threads = 5