db_connection v1.1.3 DBConnection.Sojourn.Regulator View Source
A :sregulator
callback module using an unlimited queue and a CoDel strategy
for the valve.
Connection options
:idle_interval
- The time interval in milliseconds before the pool will start increasing connections, ideally the 95-99 percentile the connection and handshake time for a database connection (default:100
):idle_target
- The target idle time for a connection in milliseconds, ideally 5-10% of the:idle_interval
so the connection queue does not shrink or grow too quickly (default:div(idle_interval, 20)
)
Underload alarm options
:underload_alarm
- Eithertrue
to set an alarm on underload orfalse
not to - underload means less connection processes are queuing with the regulator than expected and should only occur if connection processes are unable to connect to the database (default:true
):underload_target
- The target time in milliseconds for the regulator to wait for a connection process (default:500
):underload_interval
- The interval in milliseconds for an alarm to be set when the regulator is waiting longer than the target time for a connection process (default:5_000
)