Best approach for Dynamic routing

Hi All,

What is the best approach for implementing Dynamic routing for the below
use case

-Route web service calls to a separate server (location based)
-Route user UI Web requests to a separate server (location based)
-A single server URL for multiple implementations and provide a
mechanism to route to different web service server and UI server based
on customers
e.g.------------------- Nginx Proxy

c 1 proxy.abc.com —> | --> Web service server S 1
------------------------------- | --> UI server S 1

c 2 proxy.abc.com —> | --> Web service server S 2
------------------------------- | --> UI Server S 2

c n proxy.abc.com —> | --> Web service server S n
------------------------------- | --> UI Server S n

  • Ability to add web service server and UI server dynamically
  • Ease to maintain and possibly have a central repository for the
    mapping and Web service server and UI server backend URLs
  • Minimum proxy overhead

-paphillon

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,227678,227678#msg-227678

I’ve been tinkering with some Lua that uses redis that does something
similar. In my “day job” we have a json file per site for a service
and chef generates nginx configs from that. No UI or anything, but it
gets it done.