hazelcast map 备份策略
来源:互联网 发布:mysql平均数 编辑:程序博客网 时间:2024/05/01 03:47
Backups
Hazelcast will distribute map entries onto multiple JVMs (cluster members). Each JVM holds some portion of the data but we don't want to lose data when a member JVM crashes. To provide data-safety, Hazelcast allows you to specify the number of backup copies you want to have. That way data on a JVM will be synchronously copied onto other JVM(s). By default, Hazelcast will have one backup copy. Backup operations aresynchronous. When a map.put(key,value)
call returns, it means entry is updated on the both owner and backup JVMs. If backup count >= 1, then each member will carry both owned entries and backup copies of other member(s). So for the map.get(key)
call, it is possible that calling member has backup copy of that key but by default, map.get(key)
will always read the value from the actual owner of the key for consistency. It is possible to enable backup reads by changing the configuration. Enabling backup reads will give you greater performance.
<hazelcast> ... <map name="default"> <!-- Number of backups. If 1 is set as the backup-count for example, then all entries of the map will be copied to another JVM for fail-safety. Valid numbers are 0 (no backup), 1, 2, 3. --> <backup-count>1</backup-count> <!-- Can we read the local backup entries? Default value is false for strong consistency. Being able to read backup data will give you greater performance. --> <read-backup-data>false</read-backup-data> ... </map></hazelcast>
Q. If I have only one backup-copy then, will I always lose data if two JVMs crash at the same time?
Not always. Cluster member list is the same on each member. Hazelcast will backup each member's data onto next members in the member list. Let say you have a cluster with members A, B, C, D, E, F, G and the backup-count is 1, then Hazelcast will copy A's data onto B, B's data onto C... and G's data onto A. If A and B crashes at the same time then you will lose data because B was the backup of A. But A and C crashes at the same time, you won't lose any data because B was the backup of A and D was the backup of C. So you will only lose that ifsequential-JVM-crash-count > backup-count
.
- hazelcast map 备份策略
- 探讨Hazelcast分布式map的驱逐策略实现
- Hazelcast
- Hazelcast
- hazelcast学习笔记---map基础篇
- hazelcast学习笔记---map进阶篇
- hazelcast学习笔记---map高级特性
- 备份策略
- Linux备份策略研究
- SQL*Server 备份策略
- Mysql数据库备份策略
- ORACLE备份策略
- ORACLE备份策略
- 磁带机备份策略
- 备份策略设计
- ORACLE数据库备份策略
- 数据备份策略
- ORACLE 备份策略
- 去年寒假生活记一
- 正则表达式生成器
- 正则表达的使用
- Android系统匿名共享内存Ashmem
- 如何判断是wap访问还是www访问
- hazelcast map 备份策略
- Linux SAMBA服务器安装、配置与管理技术
- 打拼我们的世界,要像树一样成长
- heci
- push apk到设备
- linux下安装hudson教程
- 安装office2007之windows installer 服务不能更新一个或多个受保护的windows文件问题解决
- 如何查看apache加载了哪些模块
- 程序员必备的七大面向对象设计原则(一)