Thanks for the insight. New implementation is based on the approach of single Hazelcast cluster shared across all webapps and context param (similar to </distributer> tag) based approach to enable/disable session replication.
On Tue, Oct 14, 2014 at 11:10 AM, Kishanthan Thangarajah < [email protected]> wrote: > Hi Pubudu, > > Just to be clear, this feature should work on per webapp basis. i.e not > all webapps' sessions should be replicated, but the selected ones by the > user. Earlier we used a webapp context property (distributable) to enable > this at webapp level. > I agree with you, In the current implementation it uses similar approach and it won't replicate every single web app session. Therefore it only looks in to the context property of the web.xml file and replicate the session accordingly. > > Also here are the test cases that comes to mind. > > Say that we have a two node cluster (node-1, node-2) > 1. Start both nodes -> change session values at node-1, then check whether > those changes are reflected at node-2 (also check this both ways). > 2. Start node-1 -> change session values at node-1 -> start node-2 and > check whether session got replicated to node-2. > 3. Same as #2 above, but after the third step, stop node-1 and change the > session values at node-2 then start node-1 again and check the session > state. This should have the latest changes at node-1 even-though that node > was offline for while. > > I've looked in this approach as well and feature works as expected. Tested failover scenarios as well. > The above tests should make sure that session object was available all the > time in the cluster, even-though the nodes were not available all the time. > > The next step is to test this with ELB setup. > Say that we have a 1-Mgt+2-Worker setup fronted by an ELB. Since our ELB > is session aware, it will send the requests to the same node based on the > seesionID. And when that node goes offline, it will route the requests to > the other node. But if we have enabled replication, this routing should > work seamlessly where the same session object - which was replicated - will > be used by the second node. > > Majority of the time I've tested this feature using a cluster environment ( Elb and two AS nodes ). Fail over use cases are also tested. > So lets first do these tests and see. > > > Thanks, > Kishanthan. > > -- *Pubudu Dissanayake* Software Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mob: + 94 775 503 304 Blog: http://geekdetected.wordpress.com/ Linkedin: *http://lk.linkedin.com/in/pubududissanayake* <http://lk.linkedin.com/in/pubududissanayake> Flickr : https://www.flickr.com/photos/pubudufx/ Twitter: https://twitter.com/GeekInAction
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
