Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to configure Apache Tomcat load balancing for the below scenario

 
Abdul aariz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. User tries to access the App
2. Apache server should redirect the request to 2 different Apps based on the following condition

2.1 If the request comes from 192.168.10.XXX series it should redirect to App1
2.2 If the request comes from 192.168.100.XXX series it should redirect to App2
2.3 If any one App is down the Apache server should send the reuqest to the running App

For Eg:
2.3.1 If a request is coming from 192.168.100.XXX series and App2 is down then the Apache server should
redirect to App1
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65658
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what's the question?
 
Abdul aariz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to configure the above setup
I want know the details steps to configure the above setup
 
Tim Holloway
Bartender
Posts: 18467
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be better to route requests based on actual loads rather than simply on which source network address they came from. Otherwise, one server can end up swamped while the other is idle, and since "swamped" isn't the same thing as "down", your fallback case wouldn't apply.

However, you should be able to employ Apache's mod_rewrite rules to rewrite the incoming URLs based on the source network.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!