Closed GoogleCodeExporter closed 8 years ago
Please ask questions on the mailing list:
http://groups.google.com/group/memcached-session-manager
When you post there, can you explain what you want to say with
"..., but I think your high-aviliablity clusters just like heartbeat..."
Still, great that you're interested :-)
Original comment by martin.grotzke
on 8 Mar 2010 at 8:51
thank you very much ! English is not my nother language , sorry for my
mistakes,
I meant the example is "X" , just for 2tomcats and 2memcacheds run on two
servers ,
how can this "X" works on my architecture ?
Haproxy
|
|--------nginx (for statics)
|
----------------------- (for jsp app)
| | | |
tomcat1 tomca2 tomca3 tomcat4
|------|------|-------|
|
|
Mysql
Original comment by rolling...@163.com
on 8 Mar 2010 at 9:13
You should do this:
- Configure HAProxy so that it's doing sticky session (appsession?). Check that
you specify as the
length for appsession the length of the session id without the memcached node
id (e.g. if the session
id is 123456-n1 you should set 6 as length, at least if I understood
appsession/length correctly)
- Configure tomcat1 with
memcachedNodes="n1:tomcat1:11211 n2:tomcat2:11211 n3:tomcat3:11211 n4:tomcat4:11211"
failoverNodes="n1"
- Configure tomcat2 with n2 as failover node:
memcachedNodes="n1:tomcat1:11211 n2:tomcat2:11211 n3:tomcat3:11211 n4:tomcat4:11211"
failoverNodes="n2"
- Configure tomcat3 and tomcat4 following the same rule
In n1:tomcat1:11211 tomcat1 stands for the ip address / hostname of tomcat1 and
asumes that on this
machine a memcached is running and listening on port 11211. Futhermore this
asumes, that each
tomcat/memcached pair is on its own machine. If all would be running on the
same machine the
failoverNodes could be left blank. Basically as failoverNodes should those
memcacheds be configured
that are running on the same machine as the tomcat (so that in the case of a
hardware failure the
sessions of this failing tomcat are _not_ stored in the memcached running on
the same machine).
Your memcached instances should get some memory, you could run them e.g. like
this:
$ memcached -p 11211 -u memcached -m 1024 -M
If you have further questions please ask them on the mailing list:
http://groups.google.com/group/memcached-session-manager
(or don't you want to use this / have issues using it?)
Original comment by martin.grotzke
on 9 Mar 2010 at 1:24
Original issue reported on code.google.com by
rolling...@163.com
on 8 Mar 2010 at 7:50