5

The hazelcast documentation states that

If a member goes down, its backup replica that also holds the same data, will dynamically redistribute the data including the ownership and locks on them to remaining live nodes. As a result, no data will get lost.

Few questions

a) If a backup of 1 is configured for a member in the cluster then does that imply that there is only 1 more member in the cluster which has the backup for that member ? Or is there a backup of the backup ?

b) So given a) if both the member and its backup go down then would there be data loss ?

c) If there is a write through strategy in place and both the member and its backup go down and there is data loss then is there a mechanism in place to restore the data dynamically (using the write through mechanism or something else ) ?

Thanks in advance

sunny
  • 824
  • 1
  • 14
  • 36

1 Answers1

4

A few answers:

a) backups are configured on a data-structure level. So you could say: this map has 1 synchronous backups... and that map zero.. or 2 or...

Backups can be synchronous (meaning that there is a write through of the change to the backup) or it can be a write behind (so at some point in time the backups is done). Asynchronous and synchronous backups are configured independently on the data-structure level.

b) yes. That is why you can configure more than 1 backup if you have such high availability requirements.

c) some of the datastructures (e.g. map/queue) can be configured with a maploader/mapstore strategy; which makes it possible to e.g. write your changes to disk/database etc.

pveentjer
  • 10,545
  • 3
  • 23
  • 40
  • As a follow up the documentation states "If backup count >= 1, then each member will carry both owned entries and backup copies of other member(s)" . Does this imply that each member will have a backup of other members ? Say in a cluster of 5, and backup count of 2 for a map1 on node 1, does every member in the cluster have a copy of map1 as a backup or at any given time 2 members of the cluster would have a copy ? – sunny Dec 04 '13 at 17:54
  • 1
    The documentation is a bit misleading. If you have 5 members, and lets assume there are 5 partitions and a single backup, then each each member will have a primary partition and a backup partition. So a single member will not contain all the backups of all the partitions. If this would be the case, the map will never scale beyond a few gigabytes of memory :) So if you have a single backup, 10M items and 10 machines, than each member will have 1M items from the primary and 1M items from the backup. – pveentjer Dec 05 '13 at 16:21