wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Apache Tomcat clustering based on client's location Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache Tomcat clustering based on client Watch "Apache Tomcat clustering based on client New topic
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: 19651
    
  18

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 - OCEEJBD 6
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

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Apache Tomcat clustering based on client's location
 
Similar Threads
How to access Weblogic cluster
EJB cluster
Loadbalacing Tomcat server using Apache
RMI + Thread: perform searching on different worker PCs
Accessing a cluster