On Thu, 4 Aug 2011, [email protected] wrote:
Andy
Thank you for the quick response.
My scenario is I have many tomcat instances running and they are load balanced.
Each of these have CAS installed on them individually. My problem was the users
were not getting authenticated in this clustered environment possibly because
the CAS tickets were not getting replicated. So I think I have to replace the
defaultcache registry with memcache + repcache.
1. Please let me know if my understanding is right ?
2. I am using CAS 3.4 , do I have to download memcache and install it ?
3. Could you please point me to any link that has steps to set up repcache?
Here are my notes for repcache. Note that I am using Debian Squeeze as
the OS.
1. aptitude install libevent-dev
2. Get patch: http://mdounin.ru/files/repcached-2.3.1-1.4.5.patch.gz
3. Get memcached-1.4.5 source
4. Patch the source with "patch -p1 < repcached-2.3.1-1.4.5.patch"
5. ./configure --prefix=/private/repcached --enable-replication
6. make
7. make install
Something important to consider about repcache - it can only replicate
between 2 nodes. I have only 2 CAS nodes, so I installed
memcache+repcache on each CAS node. CAS is configured to look for
memcache at localhost only.
If you have more than 2 CAS nodes, then you would need to operate memcache
differently, such as on systems separate from CAS.
When you configure a memcache client (including the memcache ticket
registry in CAS), if you specify more than 1 memcache server, the client
will use a hashing algorithm to decide which memcache server to store the
entry. In this way, memcache entries are distributed between the various
memcache servers (sharding). If one of the memcache servers goes down,
those entries are lost.
I prefer the repcache method, but it won't scale beyond 2 nodes (so far as
I know).
Andy
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user