What Happens to Data When a Node Leaves the Network?

The DHT of a Holochain app makes sure that there are always enough nodes on the network to hold a given piece of data.

When people running Holochain apps turn off their device, they leave the network. What happens to their data and the data of other people that they were storing? There are always enough nodes that hold a given piece of data in the network to prevent data loss when nodes leave. The DHT and Holochain gossip protocol are designed this way. Also, the redundancy factor of data on a given DHT is configurable, so it can be fine-tuned for any purpose. For example, a chat app for a small team might set a redundancy factor of 100% in order to prevent long loading times, while an app with thousands of users might have a very small redundancy factor.

6 Likes

We’ve been calling this “self healing”.

3 Likes

biology is amazing

1 Like

How the data is restored when the node gets back to the DHT?
for eg: I am using a Holochain financial application or a chat application and I had done so many transactions or chats over a while. All of a sudden my node gets crashed. I reinstalled the financial and chat applications. Will all my previous data gets restored? if so how?

Well @adarshr ,

That depends: if your happ was using the agentpubkey (an id that gets created when you install a happ on a node) as a way to identify the data you create in your financial or chat app, then yes all your data would lost. Actually not lost, but inaccessible because you no longer have your private key. I’m imaging here that your happ crashed, big style, meaning all data lost forever. So your data would still live in the DHT, but you would not be able to claim it as your own.
Remember the DHT is a public space.

But a well designed happ will use a profile or identity access system that is not tied to one physical node. In that case you would still be able to access your data.

1 Like

Nice.

So the private key is node dependent? Why can’t you make the holo architecture in such a way that the private key is part of the DHT independent of the private node and it can be an identity to access one’s data across any happ platform.