Who Rebalances Existing Database Connections When Application Pods Scale?

0
0
Asked By MellowCedar42 On

I'm running multiple application pods that connect to PostgreSQL through SQLAlchemy. Each pod maintains its own connection pool, so scaling from three replicas to ten creates several new pools while connections already held by the original pods remain open.

If PostgreSQL read replicas sit behind a Kubernetes Service or another proxy, new connections may be routed to newly available replicas. However, existing pooled connections are still attached to the database instances they originally reached.

When scaling out changes the desired connection distribution, what component is normally responsible for handling existing connections? Does the application pool, a connection pooler, or the proxy need to recycle or rebalance them?

0 Answers

There is no answer to this question yet. If you know the answer or can offer some help, please use the form below.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.