Hazelcast - What is the best cluster topology to serve multiple applications in client/server mode?

柔情痞子 提交于 2019-12-11 05:09:56

问题


Almost all of our applications are using Hazelcast cluster in embedded topology. Due to high load on the applications, we are occasionally having memory and cpu problems. Because of this we are planning to change our topology from embedded to client/server mode.

The question is, should we set up a new cluster for each application? Or should a single cluster serve all the client applications?

I know that multiple hazelcast instances can be started in jvm (http://docs.hazelcast.org/docs/3.5/manual/html/createclustergroups.html). Could this also be an option for production?


回答1:


Let's analyze based on the use-cases.

  • UseCase-1: The Hazelcast cluster is mainly used as a Distributed cache. In this case, you can simply keep a common cluster and all the applications can maintain HazelcastClient to access the cluster.
  • UseCase-2: The Hazelcast cluster is being used both as a Distributed Cache as well as Distributed Computing purpose using executors. In this case, you need to analyze the amount of data that you will be storing in the cluster and the type of calculations that you will be running using executor pool. You will have to take the number of CPU/Cores also into consideration while allocating the nodes across multiple servers.

Best Practices

  • Keep the HazelcastClient objects as singleton so that the connection would be reused for each requests instead of creating multiple client connections adding network overhead which can impact the performance.

  • Utilize the NearCache feature wherever applicable, to cache the frequently accessed data at the client side itself instead of making a trip to the cluster for each call.

  • It's better to start each node in their own JVMs instead of running multiple nodes inside a single JVM. Any unforeseen issue in parent JVM will lead to crashing of all the nodes.



来源:https://stackoverflow.com/questions/44039220/hazelcast-what-is-the-best-cluster-topology-to-serve-multiple-applications-in

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