| Author |
Apache Tomcat clustering based on client's location
|
Jatin Sutaria
Greenhorn
Joined: Dec 09, 2004
Posts: 27
|
|
Hello,
I have a cluster of 2 servers running on different JVM's in different geographical locations - US and IN.
My requirement is getting an ability to dispatch requests to specific servers based on client's location - If some one in US hits the cluster URL, he should be dispatched to the server in US.
W.r.t this I have following queries -
1. Do we have an ability to do load balancing based on clien't i/p in Apache Tomcat? If yes, would appreciate if I get some pointers.
2. Secondly, if i can't do the former can I redirect client requests from server 1 - US to server 2 - IN before I hit any business logic in any of the servers. If that is possible I can have a servlet in front that decides where to delegate requests to based on client i/p and then do the redirection?
Thanks,
JS
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Do you need load balancing for this? Because as I see it, this isn't really load balancing. It's just sharing the same URL for two different servers. Perhaps you can do something on a DNS level instead; for US users the DNS resolves the host name to the US server, for IN users the DNs resolves the host name to the IN server.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Jatin Sutaria
Greenhorn
Joined: Dec 09, 2004
Posts: 27
|
|
Thanks Rob,
I guess I could do this if this is my only requirement. There are other use cases that may require clustering capabilities. I am not too sure if I can use the DNS level filtering for specific use cases ?. If that is the case, keeping clustering in mind, can we do something to achieve the goal?
Regards,
JS
|
 |
 |
|
|
subject: Apache Tomcat clustering based on client's location
|
|
|