Reputation: 704
I have 3 back end nodes to handle traffic but round robin doesn't work in my case. Is it possible to use Apache web server and route(proxy) all traffic from A-E to server 1, F-S to server 2 and T-Z to server 3? I don't want the url to change.
For example: build.amz.com/TEST should go to server 3 while build.amz.com/ECHO should go to server 1? I am new to Apache, any directions towards how to achieve this is helpful
Upvotes: 1
Views: 59
Reputation: 10869
You can try something like this:
ProxyRequests Off
ProxyPreserveHost On
ProxyPassMatch ^/([A-Ka-k]+)(.*) http://server1/$1$2
ProxyPassReverse / http://server1/
ProxyPassMatch ^/([L-Pl-p]+)(.*) http://server2/$1$2
ProxyPassReverse / http://server2/
ProxyPassMatch ^/([Q-Zq-z]+)(.*) http://server3/$1$2
ProxyPassReverse / http://server3/
#ProxyPassMatch ^/(.*) http://serverdefault/$1
#ProxyPassReverse / http://serverdefault/
Upvotes: 1