How is data in Reliable Dictionary in Azure Service Fabric persisted to disk
How is data in Reliable Dictionary in Azure Service Fabric persisted to disk
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
1 Answer
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
One more addition - according to this 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 at 12:46
Thanks Diego. Its very helpful, very nicely summarised. Thanks once again!!!
– Akshat
2 days ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Did you see this answer? stackoverflow.com/a/36752442/5946937
– LoekD
Jun 29 at 8:47