Changing KeepAlive in PaxWeb / Jetty for better Load Balancing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Changing KeepAlive in PaxWeb / Jetty for better Load Balancing

Frizz
I'm using Karaf with PaxWeb / Jetty for Web Services.

Is there a way to force reset a connection after it served an amount of requests?

Unfortunately Jetty does not respect the maxKeepAliveRequests setting (https://bugs.eclipse.org/bugs/show_bug.cgi?id=437636)

My use case for this are some Web Services that sit behind a (Google Cloud) Load Balancer. The Load Balancer distributes the requests very unequally, because the clients keep the connections open - and than the Load Balancer always directs the requests to the same Karaf instance.

Forcing the clients to open a new connection every couple of requests / couple of seconds would make the Load Balancer chose a different target.