Book Image

Getting Started with Hazelcast, Second Edition

By : Matthew Johns
Book Image

Getting Started with Hazelcast, Second Edition

By: Matthew Johns

Overview of this book

Table of Contents (19 chapters)
Getting Started with Hazelcast Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Grouping and separating nodes


By default, Hazelcast treats each instance as a completely separate node and, as such, will use any combination of the cluster nodes to hold copies (either for ownership or backups). This instantly introduces a problem where we run multiple JVM instances on the same machine (either physical or virtual). Any host or hardware level issues that affect one JVM might affect multiple instances at the same time, putting data resilience at risk.

To avoid this, we can configure Hazelcast to assign partitions not to an individual node, but to a defined group of nodes. Typically, these groups of nodes will share a common external risk or need to balance any differences in available memory. This siloing of nodes is referred to as partition grouping.

Currently, the following three ways can be used to configure a partition group:

  1. The default per node configuration that we learnt about previously is as follows:

    <hazelcast>
      <partition-group enabled="true" group-type...