userver
userver copied to clipboard
[postgres] make connlimit-mode auto ttl dynamic
If a service is restarted slower than in 15 seconds, other instances cut out all the connections. This may lead to unneeded connection rebalancing and even some runtime errors. We should look at boot time metric and dynamically calculate TTL of a ticket:
TTL = max(3*boot_time, 15 seconds);
Internal ticket: 7922