質問

I have an HAProxy acting as a load balancer for other boxes. I know that when a box returns a response in the 500 range (on a health check), haproxy takes the box out of rotation.

What does it do if it (the proxy) gets a 503? (from a health check) 503s normally mandate a retry. Does it retry according to the Retry-After Header or does it take the box out of rotation? If it retrys, does the header matter? In other words, if there is no Retry-After header, does it still honor the 503 and retry? or does it count that as a box error and remove the box from rotation?

役に立ちましたか?

解決

Haproxy processes any 500 response as an error. https://code.google.com/p/haproxy-docs/wiki/httpchk

Only 200's and 300's are considered successes. All others are considered failures.

The answer to the second part of your question depends on how you have your health check intervals set. If you have them set to take the host of out rotation after 1 failure and the host returns a 503, then yes it will be removed from rotation. If you have it configure to require 2 failures and the host only returns 1 sequential 503 and then starts returning 200's then the host will stay in rotation.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top