Welcome! Log In Create A New Profile

Advanced

Is it possible to analyze result and query a second server?

Jason Bronnx
May 11, 2017 12:04AM
Hi,

Tried to search on this for a couple of hours, but had no luck, hoping you
guys can help.

I have a use case, that I need to proxy the request to server-A first, then
if returns 200, then it'll query server-B and return that result. If it
returned != 200, just return 404. Something like this:

function pseudoCode() {
if (server-a.process() == 200) {
return server-b.process()
}

// Got a non-200 from server-a, just return 404
return 404
}

Is there a straightforward way of doing this in nginx?

Thanks!
Jason
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Is it possible to analyze result and query a second server?

Jason Bronnx May 11, 2017 12:04AM

Re: Is it possible to analyze result and query a second server?

Aleksandar Lazic May 11, 2017 01:44AM

Re: Is it possible to analyze result and query a second server?

Roman Arutyunyan May 11, 2017 07:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 193
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready