From e7262169853ba5dd06ef3f190220aa72aa25161d Mon Sep 17 00:00:00 2001 From: Yan Song Date: Wed, 16 Mar 2022 07:20:01 +0000 Subject: [PATCH] Doc: add p2p proxy field in nydusd config Show how nydus integrate with Dragonfly P2P service. Signed-off-by: Yan Song --- docs/nydusd.md | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/docs/nydusd.md b/docs/nydusd.md index 9cca659a352..f70df3d6095 100644 --- a/docs/nydusd.md +++ b/docs/nydusd.md @@ -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": { @@ -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: