db_connection v1.0.0-rc.0 DBConnection.Sojourn.Broker
A :sbroker callback module using a timeout strategy for the client queue and
a CoDel strategy for the connection queue.
Queue options
:queue_timeout- The time to wait for control of the connection’s state (default:5_000):queue_out- Either:outfor a FIFO queue or:out_rfor a LIFO queue (default::out):queue_drop- Either:dropfor head drop on max size or:drop_rfor tail drop (default::drop):queue_size- The maximum size of the queue (default:1024):queue_min- The minimum number of requests in the queue before the queue will timeout requests (default:0)
Queue protector options
:protector- Eithertrueto enable the queue protector orfalsenot to (default:false):protector_interval- The time interval in milliseconds before the protector will start dropping requests, ideally the 95-99 percentile response time for a failure response to an end user, e.g. 95 percent response time for a HTTP 500 response to a mobile user (default:5_000):protector_target- The target queue time in milliseconds, ideally 5%-10% of the:protector_intervalfor the queue to feel responsive, (default:div(protector_interval, 10)):protector_size- The maximum number of requests the protector will try to allow in the message queue (default:64):protector_min- The minimum number of requests in the message queue before the protector will drop requests (default:0)
Queue overload alarm options
:overload_alarm- Eithertrueto set an alarm on overload orfalsenot to - a protector should prevent overload so defaults tofalsewhen using a protector, otherwisetrue(default:not protector):overload_target- The target time in milliseconds for messages in the message queue (default:500):overload_interval- The interval in milliseconds for an alarm to be set when messages are spending longer than the target time in the message queue (default:5_000)
Idle connection options
:idle_out- Either:outfor a FIFO queue or:out_rfor a LIFO queue (default: ifpool_overflow == 0:out, otherwise:out_r):idle_interval- The time interval in milliseconds before the pool will start pinging or dropping connections, ideally the 95-99 percentile the connection and handshake time for a database connection (default:100):idle_min- The minimum number of idle connections before the pool will ping or drop idle connections (default:div(pool_size, 4))
Regulator options
:regulator_update- The average interval in milliseconds to update the regulator (default:100)