I'm trying to get my head around memcached/repcached as well and I've looked
at all the docs, but I had a question about the config from the wiki:
Two CAS servers: CAS1 & CAS2 with Repcached running on port 11211
Both CAS servers have the MemCacheTicketRegistry configured to use both
Repcached servers:
On CAS1:
<bean id="ticketRegistry"
class="org.jasig.cas.ticket.registry.MemCacheTicketRegistry">
<constructor-arg index="0">
<list>
<value>127.0.0.1:11211</value>
<value>rep2:11211</value>
</list>
</constructor-arg>
<constructor-arg index="1" type="int" value="21600" />
<constructor-arg index="2" type="int" value="300" />
</bean>
On CAS2:
<bean id="ticketRegistry"
class="org.jasig.cas.ticket.registry.MemCacheTicketRegistry">
<constructor-arg index="0">
<list>
<value>127.0.0.1:11211</value>
<value>rep1:11211</value>
</list>
</constructor-arg>
<constructor-arg index="1" type="int" value="21600" />
<constructor-arg index="2" type="int" value="300" />
</bean>
OK, this all works fine - you can use CAS1 or CAS2 to login and ticket
validation work from both systems but when one server fails, half of the
ticket validations & logins fail until that server is removed from the
memcached group. Why list both servers? All of the tickets are being
replicated between the two servers, so if you only connected to memcached on
localhost you would always see all the tickets and would not have the 50%
failure rate when the other server was down. Am I missing something?
Eric Pierce, RHCE -- University of South Florida -- (813) 974-8868 --
[email protected]
On Wed, Jul 1, 2009 at 10:08 PM, Scott Battaglia
<[email protected]>wrote:
> If you're not familiar with how Memcache and repcache work, I recommend
> reading up on their documentation:
>
> http://www.danga.com/memcached/
> http://repcached.lab.klab.org/
>
> You'll want to understand how they work and their implications if you're
> considering deploying them.
>
> Cheers,
> Scott
>
>
> On Wed, Jul 1, 2009 at 5:56 PM, venu.alla <[email protected]> wrote:
>
>> hi,
>> I see that the memcacheTicketRegistry bean takes a list of the memcache
>> servers in the form host:ip. We will be doing some quick tests, but thought
>> I will ask the forum following questions anyways.
>>
>>
>> 1. Does the memcache client do redundant writes to all the hosts in the
>> list or does it only do failover writes?
>>
>> 2. are reads redundant or failover only. By that I mean, if a request goes
>> to node-A and if the serviceTicket presented is not found there, will it
>> look up in node-B?
>>
>> 3. If it is redundant write and read, then why do we need repcache? Is it
>> because, if one of the node-1 restarts, repcache will sync the restarted
>> node to the current state of node-2?
>>
>> --
>> 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
>>
>
> --
> 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
>
>
--
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