Using mod_jk2, load balancing with Apache connection to two tomcat servers that are clustered
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   daniel_jaffa
Posted On:   Thursday, May 20, 2004 10:16 AM

I am having probelms getting mod_jk2 to load balance two tomcat servers. I have the following workers2.properties file # Defines a load balancer named lb. Use even if you only have one machine. [logger.apache2] level=DEBUG # Example socket channel, override port and host. [lb] stickySession=true [channel.socket:10.132.240.242] port=8009 host=10.132.240.242 tomcatId=10.132.240.242:8009 [channel.socket:10.132.240.241] port=8009 host=10.132.240.241 tomcatId=10.132.240.242:8009 # define the workers [ajp13:10.132.240.242] channel=channel.socket:10.1   More>>

I am having probelms getting mod_jk2 to load balance two tomcat servers.


I have the following workers2.properties file



# Defines a load balancer named lb. Use even if you only have one machine.


[logger.apache2]
level=DEBUG



# Example socket channel, override port and host.


[lb]
stickySession=true

[channel.socket:10.132.240.242]
port=8009
host=10.132.240.242
tomcatId=10.132.240.242:8009

[channel.socket:10.132.240.241]
port=8009
host=10.132.240.241
tomcatId=10.132.240.242:8009

# define the workers
[ajp13:10.132.240.242]
channel=channel.socket:10.132.240.242:8009
lbfactor=100
group=lb
tomcatId=worker2
jvmRouter=worker2

# define the workers
[ajp13:10.132.240.241]
channel=channel.socket:10.132.240.241:8009
lbfactor=10
group=lb
tomcatId=worker1
jvmRouter=worker1

[status:]
info=Status worker, displays runtime information

# Map the Tomcat examples webapp to the Web server uri space
[uri:/justicecenter/*]
group=lb


[uri:/jkstatus/*]
info=The Tomcat /jkstatus handler
group=status:


This works but when i try to hit any page a second time it appears that my session disappears.

Any help would be welcomed.

   <<Less

Re: Using mod_jk2, load balancing with Apache connection to two tomcat servers that are clustered

Posted By:   daniel_jaffa  
Posted On:   Thursday, May 20, 2004 10:18 AM

Sorry added breaks to file

# Defines a load balancer named lb. Use even if you only have one machine.





[logger.apache2]

level=DEBUG







# Example socket channel, override port and host.





[lb]

stickySession=true



[channel.socket:10.132.240.242]

port=8009

host=10.132.240.242

tomcatId=10.132.240.242:8009



[channel.socket:10.132.240.241]

port=8009

host=10.132.240.241

tomcatId=10.132.240.242:8009



# define the workers

[ajp13:10.132.240.242]

channel=channel.socket:10.132.240.242:8009

lbfactor=100

group=lb

tomcatId=worker2

jvmRouter=worker2



# define the workers

[ajp13:10.132.240.241]

channel=channel.socket:10.132.240.241:8009

lbfactor=10

group=lb

tomcatId=worker1

jvmRouter=worker1











[status:]

info=Status worker, displays runtime information



# Map the Tomcat examples webapp to the Web server uri space

[uri:/justicecenter/*]

group=lb





[uri:/jkstatus/*]

info=The Tomcat /jkstatus handler

group=status:
About | Sitemap | Contact