amazon-web-serviceshazelcastamazon-eksleader-election

Hazelcast master node election in EKS / AWS is possible?


We have a spring boot application running in physical boxes. Planning to migrate to EKS (AWS). We have hazelcast used for multiple purposes listed below.

Is it possible to use hazelcast itself in AWS to make use of the same features.?
Or should I used any other technology than using hazelcast itself ?

Hazelcast is used for:
1. Master Election (of machines)
2. Caching (To keep some files sometimes and mainly to websocket messages and to transmit those whenever required)

Master Election : It is used to pick any one machine out of 4 boxes, to do a particular job until next restart/re-deploy.

Hazelcast version used : com.hazelcast.hazelcast : 3.4.2

Reference : what algorithm hazelcast uses to find the master node

Note : Previously I mentioned as leader (actually it's master in the case of Hazelcast)


Solution

  • A. You need to upgrade to a more recent version, preferably 3.12.5, as the later versions have more capabilities in terms of features than their predecessors.

    B. From what I could understand, you need a distributed lock so that when acquired, no other application or thread or member can perform the operation defined within the lock boundary. Check out here: https://docs.hazelcast.org/docs/3.12.5/manual/html-single/index.html#lock

    Using Hazelcast as a distributed system for its features is agnostic to the underlying platform, EKS or AWS direct or on-prem. Once a cluster is formed, you may want to look at Hazelcast as a service with all the distributed features listed in ref manual.