Custom Load Balancer on Kubernetes based on number of available connections on the pod

Viewed 39

There is a system that allows us to establish at most 100 http connections.

We have a Spring boot app that connects to that system using a connection pool with a limited size and as request come in, if there are no connections in the pool, the requests waits in a queue for an available connection.

The app is deployed to Kubernetes, and it scales and round robin requests to the pods.

When load comes in, some pods have available connections and others don't and was wondering, is there a way I can configure a custom load balancer on Kubernetes to forward requests to pods that have the highest available connection count rather than round robin?

1 Answers
Related