kvcache-ai / kvcache-ai/AgentENV
P2P snapshot distribution
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 309
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 66
Description
## Motivation
A key driver for P2P distribution is **efficient snapshotting (checkpoint)**. With centralized storage, the snapshot publish path must upload potentially large artifacts (memory + disk checkpoints) to the remote store before the operation is considered complete. This upload latency blocks the snapshot call and limits how fast checkpoints can be taken. With P2P distribution, the publishing node simply commits the snapshot locally and peers pull on demand, eliminating the upload wait from the critical path.
Meanwhile, in a typical cluster the nodes that already fetched a snapshot are idle from a network perspective. They could serve artifacts to peers, turning every node into a cache and distribution point.
**Goals:**
1. **Enable efficient checkpointing** by removing the need to upload snapshot artifacts to a central store before the snapshot call returns. Publish locally, distribute lazily to peers.
2. **Better utilize the network** by letting nodes fetch template artifacts from the nearest/fastest peer rather than funneling all traffic through a central store.
Contributor guide
Assessment
This issue has not been assessed yet.