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

Scaling up the cluster


We created a cluster to house all the data with a number of nodes holding both the owned partitions and backups. However, what happens if we need to scale? This can be for a number of reasons. For example, approaching the current overall memory capacity of the application is rather demanding and can saturate a hardware resource. The solution in both cases is simple—add more nodes.

So, if we were to start with a cluster of four nodes that hold approximately 4 million objects, each individual node will hold roughly 1 million owned objects (and 1 million backups). When we introduce a new node, Hazelcast reacts by assigning partitions from the existing nodes to it. This will cause the existing data to stream across to the new node, which will take on more and more partitions until it holds an overall fair share. The net result will be that each node now only holds approximately 800,000 owned objects (and a similar number of backups). By adding this new node, we create an...