Azure Service Fabric中“可靠字典"中的数据如何持久保存到磁盘 [英] How is data in Reliable Dictionary in Azure Service Fabric persisted to disk
问题描述
Azure可靠字典实际上是如何处理数据持久性的.是像SQL那样将除索引(即本例中的键)以外的几乎所有数据都保留在磁盘上,还是像将所有内容都存储在内存中(即键和值)并仅在磁盘上保留备份的哈希图一样
Reliable Collections的当前实现将整个数据集存储在内存中,并将副本序列化在磁盘中.
需要保留在内存中,因为磁盘中存储的数据已序列化,并且对这些数据的查询将花费很长时间才能反序列化以检索数据.
在他们提到的一个问答活动中,他们计划采用一种替代解决方案,将热数据存储在内存中,将冷数据存储在磁盘中,但这在当时还只是一个积压项目,不确定他们是否会尽快实施.
以下链接还将提供有关集合存储的一些额外见解:
Azure Service Fabric可靠的收集和内存 >
How does Azure Reliable Dictionary actually handles data persistence. Is it like SQL which persists mostly all data excepts indexes(i.e. key in our case) on disk or is like hashmap which have everything in memory(i.e. both key and value) and just keeps a backup on disk
The current implementation of Reliable Collections store the entire set of data in the memory, and a copy serialized in the disk.
It is required to stay in memory because the data stored in the disks are serialized and a lookup on this data would take too long to deserialize to retrieve the data.
From one of the Q&A sessions they mentioned that are in the plans to have an alternative solution where hot data would be in memory and cold in the disk, but it was just an item in the backlog at time, not sure if they will implement anytime soon.
The following link will also give some extra insights about the collection storage:
Capacity Limit of Reliable Collections in Stateful services
Azure Service Fabric reliable collections and memory
How data serialization affects an application upgrade
Downsides of CommitAsync() w/o any changes to collection
这篇关于Azure Service Fabric中“可靠字典"中的数据如何持久保存到磁盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!