I am working on high performance web application that uses jetty and jersey for REST. I am trying to find the best way to return 503 if CPU load, memory bandwidth or pending connections are high.
Looking around the web I did not find much instructions on how to do it, and almost nothing on Jetty.
The way to do it is using proxy, filter, code in the servlet?