memcached failover

Paul B. Henson henson at cpp.edu
Wed Aug 10 20:52:20 EDT 2016


On Tue, Aug 09, 2016 at 04:55:36PM -0400, Jorj Bauer wrote:

> Thanks for the tip; I'll check it out.

Cool, it's hosted on github:

https://github.com/UniconLabs/shibboleth-hazelcast-storage-service

Note that there isn't an official binary release yet; you need to build
it from source. Also, to work with idp 3.2.x you need to compile the
"#4" branch, not the master branch. And the docs are a bit out of date.
But I've been using it in production for over two months and it's been
working great. JJ -- when are you going to polish this up and put together
a release :)? As cool as it is I feel a bit awkward with the "assemble
from parts" instructions ;).


Here's my config from global.xml. I use linux ipsec to encrypt the
replication traffic between nodes.

   <hz:hazelcast id="hazelcast">
       <hz:config>
           <hz:properties>
               <hz:property name="hazelcast.logging.type">slf4j</hz:property>
           </hz:properties>
           <hz:network port="5701" port-auto-increment="false">
               <hz:join>
                   <hz:multicast enabled="false"/>
                   <hz:tcp-ip enabled="true">
                       <hz:members>node1, node2, node3</hz:members>
                   </hz:tcp-ip>
               </hz:join>
               <hz:reuse-address>true</hz:reuse-address>
           </hz:network>
           <hz:map name="sso_session"
                   max-size-policy="USED_HEAP_PERCENTAGE"
                   max-size="50"
                   eviction-policy="LRU"
                   eviction-percentage="5"/>
           <hz:map name="replay_cache"
                   backup-count="0"
                   max-size-policy="USED_HEAP_PERCENTAGE"
                   max-size="5"
                   eviction-policy="LRU"
                   eviction-percentage="5"/>
           <hz:map name="cas_tickets"
                   read-backup-data="true"
                   max-size-policy="USED_HEAP_PERCENTAGE"
                   max-size="10"
                   eviction-policy="LRU"
                   eviction-percentage="5"/>
                    eviction-percentage="5"/>
        </hz:config>
    </hz:hazelcast>

    <bean id="edu.cpp.ssoHazelcastStorageService"
          class="net.unicon.iam.shibboleth.storage.SingleHazelcastMapBackedStorageService">
        <constructor-arg name="mapName" value="sso_session" />
        <constructor-arg name="hazelcastInstance" ref="hazelcast" />
    </bean>

    <bean id="edu.cpp.replayHazelcastStorageService"
          class="net.unicon.iam.shibboleth.storage.SingleHazelcastMapBackedStorageService">
        <constructor-arg name="mapName" value="replay_cache" />
        <constructor-arg name="hazelcastInstance" ref="hazelcast" />
    </bean>

    <bean id="edu.cpp.casHazelcastStorageService"
          class="net.unicon.iam.shibboleth.storage.SingleHazelcastMapBackedStorageService">
        <constructor-arg name="mapName" value="cas_tickets" />
        <constructor-arg name="hazelcastInstance" ref="hazelcast" />
    </bean>


And in idp.properties:

idp.session.StorageService = edu.cpp.ssoHazelcastStorageService
idp.replayCache.StorageService = edu.cpp.replayHazelcastStorageService
idp.cas.StorageService = edu.cpp.casHazelcastStorageService


-- 
Paul B. Henson  |  (909) 979-6361  |  http://www.cpp.edu/~henson/
Operating Systems and Network Analyst  |  henson at cpp.edu
California State Polytechnic University  |  Pomona CA 91768


More information about the users mailing list