Tuesday, April 29, 2014

Expiration times of L1 & L2 caches with Hazelcast for WSO2 products

Recently I had a doubt about how L1 & L2 caches work with WSO2 products. Then I went through the blog on WSO2 Multi-tenant Cache: JSR-107 (JCache) implementation based on Hazelcast by Azeez and got an idea about the caches and how they work.

Then I had a doubt about the expiration times of these two caches, whether they have separate cache expiration times or whether they share the same expiration time value. After having a discussion about this, found out that both caches are using the same expiration time value.

In Cabon 4.2.0 based products, which is using Hazelcast, the cache expiration time cannot be configured and right now, it is hard coded. The default timeout value used with our products is 15 minutes.


graziano1955 said...

Hi Evanthika,
I tried a cluster of wso2 services with management and worker nodes fronted by an elb node (the cluster coordinator). The cluster is using the hazelcast protocol. All works fine but if I restart the elb the other nodes dont reconnect to the elb node, so i must restart all other nodes too.
Is there a way to overcome this problem?
TK in advance

Evan said...


Yes. This is a known issue. As a workaround, you can have multiple wka nodes in your cluster. For example, if you have a management node and worker nodes, you can make these wka nodes. So if you restart the ELB node, you need not to restart the entire cluster. The other wka nodes will take care of the cluster.