View Full Version : clusters and load balancing
06-03-2010, 07:55 AM
I have a question related to clusters and load balancing. What possibilities exist to remove a server from a cluster? Only stopping the server? Because in this situation my web application initializes some stopping and log-out operations (removing data from session) and when the loadbalancer switches to another active server the status of this won't be the desired one.
Yes, stopping the server is the main way. There's also a beta dynamic server functionality, but it doesn't sound like that would solve your problem. Are you talking about a programmatic notification that the webapp is stopped? If so, a servlet listener would do the trick. I'm not quite sure what you're trying to achieve, but if the listener doesn't do it, please let me know.
06-03-2010, 07:06 PM
Thank you for the reply! The scenario I am having is the following: I have two servers running the same web application. A user logs in on one server and user data is stored as session data. In case I stop this server my applications servlet listener removes (contextDestroyed) these data from the session. The loadbalancer notices that the current server is down and switches to the other active server. The problem is that all the session data is lost and the user needs to log in once more. What I would like to know is, if it exists some possibility to remove a server from the clustered environment so that it does not initiate any operations that it would normaly do when it is stoppped.
06-07-2010, 02:17 PM
I am trying to add a dynamic-server to a cluster, but keep getting this error:
java.lang.IllegalStateException: HmuxClient[ClientSocketFactory[->triad-a,192.168.0.143:6801]] can't send a query because the link is closed.
at com.caucho.bam.SimpleActorClient.queryGet(SimpleAc torClient.java:180)
at com.caucho.server.resin.ProResin.loadDynamicServer (ProResin.java:185)
at com.caucho.server.resin.Resin.createServer(Resin.j ava:1001)
at com.caucho.server.resin.Resin.start(Resin.java:108 8)
at com.caucho.server.resin.Resin.initMain(Resin.java: 1639)
at com.caucho.server.resin.Resin.main(Resin.java:1871 )
What does this mean? I kind of went through all the steps the documentation described.
To answer your earlier question if you really want to shutdown a server without it going through the actual shutdown procedure, just kill the process. It definitely won't get the shutdown signal in that case. It's a bit extreme though and might be a sign that you want to rearchitect that part of your application.
Using dynamic servers won't help the situation because they still go through normal shutdown as well.
vBulletin® v3.8.6, Copyright ©2000-2017, Jelsoft Enterprises Ltd.