If the upstream refuses to process a request, you might wish to emulate
an
unavailable service or a lack of response (timeout). Backend up and
working
are expected to process requests.
Switching between legitimate errors and faked one will be done by
monitoring backend logs.
There is no such thing as a ‘Coffee Break’ HTTP code. :oP
Here is my flow: client - nginx - upstream - real upstream
Upstream is getting the response from the ‘real’ upstream. So if real
upstream is wrong, nginx will get standard 5xx from upstream and in this
case I don’t really want nginx to try next upstream because it will hit
the
same bad real upstream with the same error code. In other cases where
real
upstream is good but one upstream is having too much load or wants to
finish up in flight requests then go down for maintenance , is it
possible
for upstream to send a soft error code to nginx to tell it try next
upstream.?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.