Skip to content

Commit

Permalink
Doc: add p2p proxy field in nydusd config
Browse files Browse the repository at this point in the history
Show how nydus integrate with Dragonfly P2P service.

Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
  • Loading branch information
imeoer committed Mar 16, 2022
1 parent 4631c5b commit e726216
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions docs/nydusd.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,12 @@ We are working on enabling cloud-hypervisor support for nydus.
// localfs | oss | registry
"type": "localfs",
"config": {
// Access remote storage backend via P2P proxy, e.g. Dragonfly client
"proxy": "http://p2p-proxy:65001",
// Fallback to remote storage backend if P2P proxy ping failed
"proxy_fallback": true,
// Endpoint of P2P proxy health check
"proxy_ping_url": "http://p2p-proxy:40901/server/ping",
// Interval of P2P proxy checking, in seconds
"proxy_check_interval": 5,
// Drop the read request once http request timeout, in seconds
"timeout": 5,
// Drop the read request once http connection timeout, in seconds
"connect_timeout": 5,
// Retry count when read request failed
"retry_limit": 0,
...
}
},
"cache": {
Expand Down Expand Up @@ -206,6 +197,35 @@ We are working on enabling cloud-hypervisor support for nydus.
}
```

##### Enable P2P Proxy for Storage Backend

Add `device.backend.config.proxy` field to enable HTTP proxy for storage backend. for example, use P2P distribution service to reduce network workload and latency in large scale container cluster using [Dragonfly](https://d7y.io/).

```
{
"device": {
"backend": {
"type": "registry",
"config": {
"proxy": {
// Access remote storage backend via P2P proxy, e.g. Dragonfly client
"url": "http://p2p-proxy:65001",
// Fallback to remote storage backend if P2P proxy ping failed
"fallback": true,
// Endpoint of P2P proxy health check
"ping_url": "http://p2p-proxy:40901/server/ping",
// Interval of P2P proxy checking, in seconds
"check_interval": 5
},
...
}
},
...
},
...
}
```

### Mount Bootstrap Via API

To mount a bootstrap via api, first launch nydusd without a bootstrap:
Expand Down

0 comments on commit e726216

Please sign in to comment.