Reputation: 374
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?
Upvotes: 1
Views: 1303
Reputation: 1294
Let's analyze based on the use-cases.
HazelcastClient
to access the cluster. 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.
Upvotes: 1