开发者

How to return 503 server busy based on cpu/memory usage or pending requests?

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜