• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Failover Logic

 
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I detect whether the WLS is active or not?
I'm trying to write a small failover logic, which will connect the clients to the secondary server when the primary server is down (or hanging or or busy or not responding for some other reason).
For this, I need to know whether the primary server is active or not. Is there any way I can check this?
Note #1: I cannot afford clustering
Note #2: Though the current requirement is for Weblogic server, it will be better if I get a generalized solution.
[ February 13, 2003: Message edited by: R Manivannan ]
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First question... does your application need HttpSession Replication? This is very important because it seriously affects your options.
I am going to assume your application is either stateless or it is an acceptable risk to lose some session information in the event of a server failure. In this case you have two basic options:
1) Use a hardware load balancer that supports server affinity. Basically it will distribute incoming requests out across multiple servers. If a server dies the load balancer will stop forwarding to that server until it comes back up. This tends to be a pretty good solution, just make sure you have proper backup for you load balancer in the case of failure (that would hurt wouldn't it?)
2) Use a piece of software to reverse proxy incoming requests across your servers. Again the software must support server affinity and fail-over detection. Good news is WebLogic supports this with the use of the WebLogic Proxy Plugin.
Option 1 will cost you some money for the hardware. Option 2 is part of the WebLogic and does not require a Clustering license, however you will probably want a separate physical server for the Http Server the the WebLogic Proxy Plugin forwards from.
Check out this link for more information: Load Balancing in a Cluster
If you need In-Memory HttpSession Replication, then I suggest you take a look at Tangosol Coherence.
[ February 13, 2003: Message edited by: Chris Mathews ]
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply Chrains.
My problem is rather simple than it might sound.
It is not necessary to replicate the session!
Currently there are two servers (say, S1 & S2).
When an user access the application, we decide whether he should be connected to S1 or S2 (based on some business logic).
Once if the user is connected & login to S1, he will use *ONLY* S1 till he logs out. His session details need not be shared with S2.
Now, assume that the server S1 fails:
The users who are already connected to S1 will face problems. That is fine. We don't need to re-connect them to S2! They will be thrown out and have to try login again.
But, all the *NEW* users who access the application should be connected to S2 (since S1 is not available). If they are connected & login to S2, they will work only in S2 till he logs out.
Now all I have to do is to check whether S1 is up or not.
How can I check this?
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Weblogic Server's JMX interface can be used to get the current status (active/inactive) of the server instances.
The following URL provides hints on how to do it:
Using the Administration MBeanHome and getMBean()
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Venkatraman Balasubramanian:
The Weblogic Server's JMX interface can be used to get the current status (active/inactive) of the server instances.
The following URL provides hints on how to do it:
Using the Administration MBeanHome and getMBean()


This is unnecessary. As stated in my previous post, fail-over is addressed by both hardware load balancers and the WebLogic Proxy Plugin. No additional steps (beyond configuration) need to be taken.
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic