0

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

Akshat
  • 615
  • 7
  • 18

1 Answers1

1

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

Diego Mendes
  • 10,631
  • 2
  • 32
  • 36
  • One more addition - according to [this](https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-reliable-collections) the data is persisted to disk during the replication. As I understand the current implementation keeps all the data in memory but at the same persists data to disk in order to be able to recover from some sort of disaster. – Oleg Karasik Jun 29 '18 at 12:46