Dynamic Routing

98 views
Skip to first unread message

Dilip Krishnan

unread,
May 13, 2017, 5:42:49 AM5/13/17
to openresty-en
How do we implement a dynamic HTTP reverse proxy in nginx where it accept incoming requests from clients and rewrite/proxy them to dynamic upstreams as instructed by a "dynamic routing endpoint" the dynamic routing endpoint is an external HTTP API endpoint that returns the IP:port of the upstream for each request when nginx receives a request it should send an HTTP subrequest, containing only the HTTP method, target hostname and URL of the original request, to the dynamic routing HTTP endpoint the dynamic routing HTTP endpoint responds to each request with a list of IP:port tuples Nginx should pick a random IP:port tuple from the ones returned in the subrequest as the upstream and proxy_pass the original request to it

David Birdsong

unread,
May 30, 2017, 2:45:06 PM5/30/17
to openresty-en
This thread which landed around the same time on the list has info relevant to your inquiry:

Reply all
Reply to author
Forward
0 new messages