Hazelcast master node election in EKS / AWS is possible?

江枫思渺然 提交于 2020-01-06 04:31:09

问题


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)


回答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.




回答2:


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.



来源:https://stackoverflow.com/questions/59212967/hazelcast-master-node-election-in-eks-aws-is-possible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!