I am just wondering how long it takes when the host node is offline. For how long does it take for the ping to get lost or the document sent to the network not to be recoverable especially if the participating node happens to crash.
Depends on how many other peers are keeping a copy. If other peers are holding a copy, then the content will stay available as long as they stay.
If the document is cached in the official IPFS gateways (because it has been accessed through them), it will usually be cleared after a few days (regardless on whether it has been accessed recently or not).
@hector thanks for the reply. Do I choose the number of peers I want to have a copy?
No, in IPFS you don’t upload anything. Others download from you if they are interested in the content, and then become providers.
I think I need to read more on the IPFS system. I actually got it wrong. I thought the files you host on your node is automatically pinged by others. That means if I go offline for a week or my system crashes, there is no guarantee from the IPFS network of having it back.