• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Apache Tomcat clustering based on client's location

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 22821
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Jatin Sutaria
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Alas, poor Yorick, he knew this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic