]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_odbc: cache_type option for res_odbc.
authorJaco Kroon <jaco@uls.co.za>
Tue, 10 Dec 2024 20:36:02 +0000 (22:36 +0200)
committerJaco Kroon <jaco@uls.co.za>
Wed, 11 Jun 2025 13:00:37 +0000 (13:00 +0000)
commitc684603d72944a6a4c86f1e69f7dca58087b808c
treed4e6d3df8258d8f0d35517881b9a64ed60ec85a4
parent7de37418fd17c9dbbf40105743a3c1714175d57f
res_odbc: cache_type option for res_odbc.

This enables setting cache_type classes to a round-robin queueing system
rather than the historic stack mechanism.

This should result in lower risk of connection drops due to shorter idle
times (the first connection to go onto the stack could in theory never
be used again, ever, but sit there consuming resources, there could be
multiple of these).

And with a queue rather than a stack, dead connections are guaranteed to
be detected and purged eventually.

This should end up better balancing connection_cnt with actual load
over time, assuming the database doesn't keep connections open
excessively long from it's side.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
UserNote: When using res_odbc it should be noted that back-end
connections to the underlying database can now be configured to re-use
the cached connections in a round-robin manner rather than repeatedly
re-using the same connection.  This helps to keep connections alive, and
to purge dead connections from the system, thus more dynamically
adjusting to actual load.  The downside is that one could keep too many
connections active for a longer time resulting in resource also begin
consumed on the database side.
configs/samples/res_odbc.conf.sample
res/res_odbc.c