Question

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?

Was it helpful?

Solution

it pretty much depends on what OS you are. if you are on linux, then it's quite easy to add 503 based on cpu/memory - use /proc/meminfo and uptime to figure loads and act as you wish. as for pending connections, that's more tricky and solution should be looked at apache level (given that your are apache).

my 2 cents.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top