Does nginx support this function? After forwarding to an application server, the application server finds that it cannot handle the business and needs to forward it to another application server. How can this be achieved?
nginx should support it. It itself can redirect with timeout. It's just that this requires manual redirection.
How to configure and implement it specifically?
世界只因有你2017-05-16 17:11:53
After nginx reverse proxy is forwarded to tomcat, it is up to tomcat to deal with it. Tomcat can directly sendRedirect to another url
天蓬老师2017-05-16 17:11:53
Here is an example, you can try it. The general principle is that after proxy_passing to upstream, if the response of upstream is 301 or 302, nginx will use the location in the response header$upstream_http_location
取出来,赋值给$saved_redirect_location
, and then proxy_pass it again
How to follow HTTP redirects inside nginx?
为情所困2017-05-16 17:11:53
This should not be configured by nginx. The specific configuration should be like this. nginx forwards the request to an application. If the application finds that it cannot handle the request, it will send the request to another application server, and this forwarding should be done by Application initiated.