RE: JK2: lb_factor
errors if you get much more requests that then can't be queued anymore. I suppose Apache prefork and worker communication via shared memory by mod_jk2 don't work well together, or the don't work at all for true round robin. Putting more than 2 Tomcats won't help with high load. I once had 10 Tomcats, but in the end only the first few got most of the load, Tomcat No 7-10 almost nothing. I also heard that Apache MPM may help, but didn't try yet. So either I forget something in my config, I have to use MPM (although nothing is really mentioned about those issues in the docu), or mod_jk2 is really not too good in this area. Last advice: If you have that option to use a hardware router than I'd suggest to use more Apaches with only one Tomcat behind each of them. This will definitely work best as those routers do a true round robin. Ralph Einfeldt wrote: The quality of the distribution depends on the worker type of apache. (AFAIK only the 'worker' MPM will work) Nevertheless AFAIK the load balancing in mod_jk is not complete in this area, so I'm not shure if you will get the desired distribution (but it should be closer). -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:48 AM To: [EMAIL PROTECTED] Subject: JK2: lb_factor I've got a cluster with 2 tomcat 2.0.25 on different machines, on one of them also running Apache 2.0.49 with JK2 as a loadbalancer. Requests get redirected to both tomcat instances, but it always ends up with around 1/3 of all requests at the local server and about 2/3 at the remote one, no matter what value the lb_factors are. So, could anyone tell me which values I should use to make the lb_factor work correctly? All information I found was that a lower value means more requests (official JK2-documentation at jakarta.apache.org). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JK2: lb_factor
Yes, I'm still struggling, too, and have quite similar problems now - I added a third server to the load balanced cluster, but only two of them get requests. I shut down each server in turn, and the load got balanced fine between the remaining two - on starting up the third server again, one always becomes idle (not always the same, above all...). Not talking about the fact that setting lb_factor to whatever value doesn't seem to have much effect on the load distribution... At least, I found out that lb_factor has nothing to do with a factor, indeed - assume that each worker has an initial lb_value, set to it's lb_factor. With every request, a worker is chosen, its lb_value gets increased by its lb_factor, and if it's smaller than lb_value of the other nodes, that worker gets the request. If lb_value is 255, it gets resetted to 0. ^^ Just search archives of Apache User Mailing List, found it there (and hope I understood correctly) - however, the mail was from some months ago, so I really don't know if it still works like this. I'd really like to know if someone has managed to build a cluster of more than 2 Tomcat servers, using Apache + JK2, with working loadbalancing? Just curious... If someone could give a hint why it does such strange things (like ignoring cluster nodes), we'd of course be thankful, too... :) Greets, Nicole -Ursprüngliche Nachricht- Von: Kommuru, Bhaskar [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 17. Juni 2004 14:12 An: 'Tomcat Users List' Betreff: RE: JK2: lb_factor I too have similar problem and have been struggling since morning. My problem is my mod_jk2 doesnt even load balance to remote server. When i shut down local servers, it puts the request to remote server.. no cluesss!! -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:48 AM To: [EMAIL PROTECTED] Subject: JK2: lb_factor Hello, I've got a cluster with 2 tomcat 2.0.25 on different machines, on one of them also running Apache 2.0.49 with JK2 as a loadbalancer. Requests get redirected to both tomcat instances, but it always ends up with around 1/3 of all requests at the local server and about 2/3 at the remote one, no matter what value the lb_factors are. So, could anyone tell me which values I should use to make the lb_factor work correctly? All information I found was that a lower value means more requests (official JK2-documentation at jakarta.apache.org). = My workers2.properties: [lb:lb] stickySession=1 # First Tomcat Instance (Localhost / 10.32.97.44) [channel.socket:localhost:8009] port=8009 host=127.0.0.1 group=lb lb_factor=1 tomcatId=tomcat01 # Second Tomcat Instance (10.32.97.23) [channel.socket:10.32.97.23:8009] port=8009 host=10.32.97.23 group=lb lb_factor=1 tomcatId=tomcat02 # define the worker for tomcat instance 1 (localhost) [ajp13:localhost:8009] channel=channel.socket:localhost:8009 # define the worker for tomcat instance 2 [ajp13:10.32.97.23:8009] channel=channel.socket:10.32.97.23:8009 #This is the application to test the cluster / load balancing... [uri:/benchmark/*] info=Benchmark application Anything wrong with that? Anything missing? If more information needed, just tell me.. I just guessed that the workers2.properties is the problem. Greets, Nicole Diese E-Mail enthalt vertrauliche und/oder rechtlich geschutzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtumlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ For information about the Standard Bank group visit our web site www.standardbank.co.za __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the group. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless
RE: JK2: lb_factor
Yes, right, that was the mail I meant. Your assumption about failover instead of load balancing seems to be correct, at least, at my cluster (one local server, on a remote machine another server + VMWare with a third server) it is the same - thanks for that comment, I was to blind to see it myself. ;-) I'll try to find out more tomorrow, maybe we'll get it to work - I'd be very interested in your progresses, however. Do you've got any idea how to realise load balancing with a defined distribution? Or, in other words: as long as it does not work properly with Tomcat mod_jk2, are there any reasons to use those, after all, instead of Tomcat's balancer-webapp, if one is mainly interested in performance issues? -Ursprüngliche Nachricht- Von: Kommuru, Bhaskar [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 17. Juni 2004 16:09 An: 'Tomcat Users List' Betreff: RE: JK2: lb_factor Do you remember that mail about lb_factor? What you said it right about lb_factor. Changing this value does not affect easily. -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:39 PM To: Tomcat Users List Subject: AW: JK2: lb_factor Yes, I'm still struggling, too, and have quite similar problems now - I added a third server to the load balanced cluster, but only two of them get requests. I shut down each server in turn, and the load got balanced fine between the remaining two - on starting up the third server again, one always becomes idle (not always the same, above all...). Not talking about the fact that setting lb_factor to whatever value doesn't seem to have much effect on the load distribution... At least, I found out that lb_factor has nothing to do with a factor, indeed - assume that each worker has an initial lb_value, set to it's lb_factor. With every request, a worker is chosen, its lb_value gets increased by its lb_factor, and if it's smaller than lb_value of the other nodes, that worker gets the request. If lb_value is 255, it gets resetted to 0. ^^ Just search archives of Apache User Mailing List, found it there (and hope I understood correctly) - however, the mail was from some months ago, so I really don't know if it still works like this. I'd really like to know if someone has managed to build a cluster of more than 2 Tomcat servers, using Apache + JK2, with working loadbalancing? Just curious... If someone could give a hint why it does such strange things (like ignoring cluster nodes), we'd of course be thankful, too... :) Greets, Nicole -Ursprüngliche Nachricht- Von: Kommuru, Bhaskar [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 17. Juni 2004 14:12 An: 'Tomcat Users List' Betreff: RE: JK2: lb_factor I too have similar problem and have been struggling since morning. My problem is my mod_jk2 doesnt even load balance to remote server. When i shut down local servers, it puts the request to remote server.. no cluesss!! -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:48 AM To: [EMAIL PROTECTED] Subject: JK2: lb_factor Hello, I've got a cluster with 2 tomcat 2.0.25 on different machines, on one of them also running Apache 2.0.49 with JK2 as a loadbalancer. Requests get redirected to both tomcat instances, but it always ends up with around 1/3 of all requests at the local server and about 2/3 at the remote one, no matter what value the lb_factors are. So, could anyone tell me which values I should use to make the lb_factor work correctly? All information I found was that a lower value means more requests (official JK2-documentation at jakarta.apache.org). = My workers2.properties: [lb:lb] stickySession=1 # First Tomcat Instance (Localhost / 10.32.97.44) [channel.socket:localhost:8009] port=8009 host=127.0.0.1 group=lb lb_factor=1 tomcatId=tomcat01 # Second Tomcat Instance (10.32.97.23) [channel.socket:10.32.97.23:8009] port=8009 host=10.32.97.23 group=lb lb_factor=1 tomcatId=tomcat02 # define the worker for tomcat instance 1 (localhost) [ajp13:localhost:8009] channel=channel.socket:localhost:8009 # define the worker for tomcat instance 2 [ajp13:10.32.97.23:8009] channel=channel.socket:10.32.97.23:8009 #This is the application to test the cluster / load balancing... [uri:/benchmark/*] info=Benchmark application Anything wrong with that? Anything missing? If more information needed, just tell me.. I just guessed that the workers2.properties is the problem. Greets, Nicole Diese E-Mail enthalt vertrauliche und/oder rechtlich geschutzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtumlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
JK2: lb_factor
Hello, I've got a cluster with 2 tomcat 2.0.25 on different machines, on one of them also running Apache 2.0.49 with JK2 as a loadbalancer. Requests get redirected to both tomcat instances, but it always ends up with around 1/3 of all requests at the local server and about 2/3 at the remote one, no matter what value the lb_factors are. So, could anyone tell me which values I should use to make the lb_factor work correctly? All information I found was that a lower value means more requests (official JK2-documentation at jakarta.apache.org). = My workers2.properties: [lb:lb] stickySession=1 # First Tomcat Instance (Localhost / 10.32.97.44) [channel.socket:localhost:8009] port=8009 host=127.0.0.1 group=lb lb_factor=1 tomcatId=tomcat01 # Second Tomcat Instance (10.32.97.23) [channel.socket:10.32.97.23:8009] port=8009 host=10.32.97.23 group=lb lb_factor=1 tomcatId=tomcat02 # define the worker for tomcat instance 1 (localhost) [ajp13:localhost:8009] channel=channel.socket:localhost:8009 # define the worker for tomcat instance 2 [ajp13:10.32.97.23:8009] channel=channel.socket:10.32.97.23:8009 #This is the application to test the cluster / load balancing... [uri:/benchmark/*] info=Benchmark application Anything wrong with that? Anything missing? If more information needed, just tell me.. I just guessed that the workers2.properties is the problem. Greets, Nicole Diese E-Mail enthalt vertrauliche und/oder rechtlich geschutzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtumlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JK2: lb_factor
Hello Ralph, could you please explain what you mean by that? My Apache has got the following (default?) modules: snip Compiled in modules: core.c mod_win32.c mpm_winnt.c http_core.c mod_so.c /snip So - do I need to use the mpm_worker_module instead of mpm_winnt? (OS of the server is Win XP Pro) If so - can you tell me how to do that? Just a configuration in httpd.conf? Or do I need to recompile Apache? (yes, I know how to read docs - only need some advice where to look...) Oh, and just to be sure - I'm using JK2, are you talking about that, or do you refer to JK / mod_jk? Btw - does anybody know a way how to distribute requests in a tomcat cluster according to current server load? (CPU-load, RAM-load or number of active sessions, for example ?) Many questions, I know... hope someone can give me a hint... Nicole -Ursprüngliche Nachricht- Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 16. Juni 2004 12:01 An: Tomcat Users List Betreff: RE: JK2: lb_factor The quality of the distribution depends on the worker type of apache. (AFAIK only the 'worker' MPM will work) Nevertheless AFAIK the load balancing in mod_jk is not complete in this area, so I'm not shure if you will get the desired distribution (but it should be closer). -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 11:48 AM To: [EMAIL PROTECTED] Subject: JK2: lb_factor I've got a cluster with 2 tomcat 2.0.25 on different machines, on one of them also running Apache 2.0.49 with JK2 as a loadbalancer. Requests get redirected to both tomcat instances, but it always ends up with around 1/3 of all requests at the local server and about 2/3 at the remote one, no matter what value the lb_factors are. So, could anyone tell me which values I should use to make the lb_factor work correctly? All information I found was that a lower value means more requests (official JK2-documentation at jakarta.apache.org). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session Replication with Tomcat 5.0.19
Hello, I've got two questions concerning in memory session replication: 1.) What exactly is the difference between SimpleTcpReplicationManager and DeltaManager? I guess that SimpleTcpReplicationManager replicates the whole session, while DeltaManager replicates only the attributes which changed. Is that correct? As far as I see, DeltaManager's performance would be much better, so what reasons could there be to use a SimpleTcpReplicationManager after all? 2.) I'd like to have a logmessage each time a session gets replicated (just for learning purpose, I like to see what's going on... ;-) ), so one of my objects I store in each session implements HttpSessionBindingListener and HttpSessionActivationListener. The object is definitely stored in the session (valueBound() shows me in the log..), and the session gets replicated, I guess - at least, I've got the valueBound() - log on both cluster nodes. However, willPassivate() and didActivate() are never called. (no log output there. ) Yes, I've set useDirtyFlag = false (otherwise, no special configurations in server.xml - just the default) and the cluster members know each other... I googled a whole day, read the java doc and everything else I could find.. but still couldn't find out how SessionActivation exactly works... I assume a session willPassivate, gets replicated and then didActivate - or am I completely wrong? Thanks, Nicole Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Starting Tomcat as service with VMWare
Hi everybody, in order to simulate a Tomcat-cluster, I've got VMWare running at my system (both host and virtual system are WinXP Pro), also running Tomcat 5.0.19 at the host system. I tried to install Tomcat at the virtual system, too, but failed: I can only start it via startup.bat - it opens a dosbox (command box) which shows the startup log and also all standard output messages, and my webapp works fine - exactly what it is supposed to do. But when I try to run Tomcat as a service, it cancels startup with errormessage Service not found. Is there something I forgot to configure, or is it just impossible to run Tomcat as a service with VMWare? If someone's got a hint, please let me know.. Thanks, Nicole PS: If someone could tell me how to run Tomcat not as a service and write output messages to standard output file instead of the command box, that would be of great help, too.. Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]