Hazelcast master node election in EKS / AWS is possible?
Asked Answered
C

2

1

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)

Courier answered 6/12, 2019 at 12:14 Comment(3)
You can use (almost) all Hazelcast features regardless on where it's deployed, either physical or AWS or any other cloud environment. You can keep using the same master election and caching features.Groschen
For master election, due to my understanding, you're using the oldest node. If you upgrade to latest 3.12.x, you can use FencedLock in CPSubsystem for leader election with a strong consistency guarantee. See FencedLock manual and Long Live Distributed Locks blog postGroschen
Thank you @mdogan. We will try that and let you know once done / any doubts.Courier
I
1

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.

Iyeyasu answered 11/12, 2019 at 23:15 Comment(0)
W
1

For caching, definitely yes. A lot of folks use it that way. Hazelcast is very well integrated with all Kubernetes environments.

For leader election, I'm not sure I understand your use case and what you'd like to do in EKS. In Kubernetes, you usually focus more on the container/pod level, not the machine itself. So, to keep the leader election between pods, then yes, you can use Hazelcast, not problem with that.

Wenoa answered 9/12, 2019 at 10:10 Comment(1)
So, to keep the leader election between pods, then yes - How can I do that ? Do you have any example or docs. I searched, but didn't find any. We need to connect MSExchange and read mails. At a time, all machines should not read mails (as it may make errors - as already read kind of problems). So we keep one dedicated (leader) machine to read for each restarts / re-deploy. Hope you got the point.Courier
I
1

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.

Iyeyasu answered 11/12, 2019 at 23:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.