Persisting Data on Disk

Persistence allows individual members and whole clusters to recover data by persisting map entries, JCache data, and streaming job snapshots on disk. Members can use persisted data to recover from a planned shutdown (including rolling upgrades), a sudden cluster-wide crash, or a single member failure.

Why Persist Data

Data in Hazelcast is usually stored in-memory (RAM) so that it’s faster to access. However, data in RAM is volatile, meaning that when one or more members shut down, their data is lost. When you persist data on disk, members can load it upon a restart and continue to operate as usual.

Clusters can use persisted data to recover from the following scenarios:

  • Cluster-wide shutdown:

    • Planned: A whole cluster is shut down and restarted with the same configuration, state, and data as before the restart. A planned shutdown includes rolling restarts, where the cluster is restarted member by member for scenarios such as installing an operating system patch or new hardware. Rolling upgrades are an example of a rolling restart.

    • Unplanned: A cluster is restarted after all its members crashed at the same time due an event such as a power outage.

  • A single member restart: A single member is restarted for whatever reason.

Supported Features

You can persist the following:

  • Contents of map or JCache data structure

  • Streaming job snapshots

  • SQL metadata, to avoid loss of SQL mappings, data connections, or views after a cluster restart.


  • Cluster crashes: When a whole cluster crashes while repartitioning, currently it is not possible to restore persisted data.

  • Map naming conventions: You cannot persist a map if its name contains either of the following. Otherwise, Hazelcast throws an exception.

    • 255+ characters

    • Special characters (*:"'|<,>?/)