postman
postman copied to clipboard
Health check fwd_host
Health check the fwd host. Add the following parameters to the config file:
[http.forward]
host = "" # fwd_host instead of fwd_host
[http.forward.health_check]
interval = 5 # Interval in seconds
url = "/" # Relative to host
threshold = 3 # Consecutive healthy/unhealthy checks to flag the host as active/inactive
max_execution_time = 5 # Above this response time (in seconds), we'll consider it a failed check
If an instance is unhealthy, we need to either:
- Stop consuming new messages from the service request queue, or
- When a new request gets routed our way, we'll:
IF the AMQP header
unhealthy_countexists and it is >= 3, THEN we'll return ano_available_instanceserror to theresponse_queueELSE, create or increment theunhealthy_countAMQP header by 1 and put the message back in the request queue so other instances can process it.