Re: [jetty-users] Separate thread pools on separate requests Hello
Note also that you can use,modify or extend the QOSFilter (quality of service) filter and/or `LowResourceMonitor` to track simultaneous requests (thread), request rates, memory levels etc. You could then explicitly handle the healthcheck requests (before qos filter) and give a better answer if more load should be accepted based on all those factors. On Mon, 13 Apr 2020 at 18:06, Simone Bordet wrote: > Hi, > > On Mon, Apr 13, 2020 at 5:34 PM Stefano Bonetti > wrote: > > > > Hello, > > apologies if this is not the right group for such a request. > > > > I have a web app with a /healthcheck path which is used by the > infrastructure to detect failing applications. At present when my app is > under high load the healthcheck starts failing with 502s, so the > infrastructure starts terminating the app instances. > > Isn't this exactly what you want? > If the server is overloaded, the health check fails exactly because > the server is overloaded - you don't want to send more requests to an > overloaded server, right? > > > I was wondering if there is a way of serving some paths (namely the > healthcheck path) on a separate thread pool, so the healthcheck requests > are not affected by high load. > > It's more complicated than this. > > A new request may trigger the opening of a new connection. > The server may be overloaded not because it's running out of threads, > but because it cannot cope with more connections - thread pools are > not exactly in the game here. > > You have to carefully control also connection opening to isolate the > health check request. > > > Is there any way of doing it? > > You can create a new ServerConnector on a different port. > Each ServerConnector can be configured with its own thread pool. > The configuration for this ServerConnector should be minimal (e.g. > acceptors=1, selectors=1, small thread pool). > > Send the health check requests to the different port. > > -- > Simone Bordet > > http://cometd.org > http://webtide.com > Developer advice, training, services and support > from the Jetty & CometD experts. > ___ > jetty-users mailing list > jetty-users@eclipse.org > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/jetty-users > -- Greg Wilkins CTO http://webtide.com ___ jetty-users mailing list jetty-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Separate thread pools on separate requests Hello
Hi, On Mon, Apr 13, 2020 at 5:34 PM Stefano Bonetti wrote: > > Hello, > apologies if this is not the right group for such a request. > > I have a web app with a /healthcheck path which is used by the infrastructure > to detect failing applications. At present when my app is under high load the > healthcheck starts failing with 502s, so the infrastructure starts > terminating the app instances. Isn't this exactly what you want? If the server is overloaded, the health check fails exactly because the server is overloaded - you don't want to send more requests to an overloaded server, right? > I was wondering if there is a way of serving some paths (namely the > healthcheck path) on a separate thread pool, so the healthcheck requests are > not affected by high load. It's more complicated than this. A new request may trigger the opening of a new connection. The server may be overloaded not because it's running out of threads, but because it cannot cope with more connections - thread pools are not exactly in the game here. You have to carefully control also connection opening to isolate the health check request. > Is there any way of doing it? You can create a new ServerConnector on a different port. Each ServerConnector can be configured with its own thread pool. The configuration for this ServerConnector should be minimal (e.g. acceptors=1, selectors=1, small thread pool). Send the health check requests to the different port. -- Simone Bordet http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. ___ jetty-users mailing list jetty-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
[jetty-users] Separate thread pools on separate requests Hello
Hello, apologies if this is not the right group for such a request. I have a web app with a /healthcheck path which is used by the infrastructure to detect failing applications. At present when my app is under high load the healthcheck starts failing with 502s, so the infrastructure starts terminating the app instances. I was wondering if there is a way of serving some paths (namely the healthcheck path) on a separate thread pool, so the healthcheck requests are not affected by high load. Is there any way of doing it? Thanks in advance for your help! Stefano Bonetti ___ jetty-users mailing list jetty-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users