-
1. Re: How to cluster a web component (a servlet application)?
brian.stansberry Jun 27, 2006 12:20 PM (in response to chwang)Whether you need the "cache stuff" depends on whether your 1) servlet application maintains session state between requests and 2) you care about failover, i.e. is it important that the session state be there if the client fails over.
Re: UrlConnection.connect, if you cluster the servlet app, you need some kind of load balancer in front of it to distribute the requests. The URL the applications point to is the load balancer. UrlConnection.connect is fine; the issue is having the correct URL. -
2. Re: How to cluster a web component (a servlet application)?
chwang Jun 27, 2006 12:41 PM (in response to chwang)Hi, Brian,
Thank you very mcuh for your replying.
I think I don't need to maintain the seesion state. the client send a request to report servlet, the servet will generate a sessionID being save in a hastable, and send ID back to the client. then Every 15 seconds, the client will send a request with this ID to query the status of report (like how many the percentage is done).
Could you tell me I need to care about fails over for this case?
If there are 2 nodes, How to set up my every 15 seconds request will stick on the the first request node?
Thank you again,
Chwang -
3. Re: How to cluster a web component (a servlet application)?
brian.stansberry Jun 27, 2006 1:00 PM (in response to chwang)Lets say the client sends the request and starts polling every 15 seconds. Then the server producing the report dies. What do you want to happen? Client connects to another server *which picks up the report creation where the first one left off*? Probably not possible, but if it is and you want it, then you need failover. I suspect that's not what you want/need.
How to set up sticky sessions depends on what load balancer you use. Here is a wiki page with more on using Apache mod_jk as the load balancer:
http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss -
4. Re: How to cluster a web component (a servlet application)?
chwang Jun 27, 2006 1:08 PM (in response to chwang)Hi, Brain,
I see, Thank you very much.
Best Regards,
Chwang