Skip to content

Commit

Permalink
docs: add comparisons (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
avtakkar authored Jul 29, 2024
1 parent 981d2fd commit 97fabe2
Show file tree
Hide file tree
Showing 10 changed files with 303 additions and 85 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ This is useful in the following scenarios:
Peerd is compatible with Azure Container Registry's [Artifact Streaming][ACR Artifact Streaming] feature, and can be
used to improve performance further.

| **Without Peerd** | **With Peerd** |
| --------------------------- | -------------------------- |
| ![normal-streaming-summary] | ![peerd-streaming-summary] |

* **Peer to Peer Container Image Pulls**: Pulling a container image to a node in Kubernetes is often a time consuming
process, especially in scenarios where the registry becomes a bottleneck, such as deploying a large cluster or scaling
out in response to bursty traffic. To increase throughput, nodes in the cluster which already have the image can be
Expand All @@ -72,6 +76,10 @@ This is useful in the following scenarios:
of the registry. Containerd has a [mirror][containerd hosts] facility that can be used to configure Peerd as the
mirror for container images.

| **Without Peerd** | **With Peerd** |
| ---------------------- | --------------------- |
| ![normal-pull-summary] | ![peerd-pull-summary] |

The APIs are described in the [swagger.yaml].

## Quickstart
Expand Down Expand Up @@ -178,3 +186,7 @@ integration with [Overlaybd].
[peerd-pkgs]: https://github.com/Azure/peerd/pkgs/container/acr%2Fdev%2Fpeerd
[build.md]: ./docs/build.md
[values.yml]: ./build/package/peerd-helm/values.yaml
[normal-pull-summary]: ./assets/mermaid/rendered/normal-pull-summary.png
[peerd-pull-summary]: ./assets/mermaid/rendered/peerd-pull-summary.png
[normal-streaming-summary]: ./assets/mermaid/rendered/normal-streaming-summary.png
[peerd-streaming-summary]: ./assets/mermaid/rendered/peerd-streaming-summary.png
85 changes: 0 additions & 85 deletions assets/images/cluster.drawio

This file was deleted.

58 changes: 58 additions & 0 deletions assets/mermaid/normal-pull-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
graph TD;
subgraph Cluster[Normal Image Pull in a Kubernetes Cluster]
subgraph ctr-1[Containerd]
subgraph store-1["Content Store"]
sl-2[sha256:l2]
end
end

subgraph ctr-2[Containerd]
subgraph store-2["Content Store"]
sl-6[sha256:l6]
sl-3[sha256:l3]
end
end

subgraph ctr-3[Containerd]
subgraph store-3["Content Store"]
sl-4[sha256:l4]
sl-5[sha256:l5]
end
end

subgraph Node1[Node A]
direction TB
kubelet["kubectl run mcr.microsoft.com/nginx:latest"]
ctr-1

kubelet ~~~ ctr-1
end

subgraph Node2[Node B]
ctr-2
end

subgraph Node3[Node C]
ctr-3
end
end

subgraph Upstream[Upstream Container Registry]
acr(mcr.microsoft.com)
end

Node1 --> |<b style="color:blue">GET sha256:l6</b>| acr
Node1 --> |<b style="color:blue">GET sha256:l3</b>| acr
Node1 --> |<b style="color:blue">GET sha256:l4</b>| acr
Node1 --> |<b style="color:blue">GET sha256:l5</b>| acr
Node1 --> |<b style="color:blue">GET sha256:l1</b>| acr
Node1 --> |<b style="color:blue">GET sha256:c1</b>| acr

classDef cluster fill:#fafafa,stroke:#bbb,stroke-width:2px,color:#326ce5;
class Node1,NodeN cluster

classDef registry fill:#e0f7fa,stroke:#00008b,stroke-width:2px,color:#326ce5;
class acr registry

classDef outer fill:#e0f7fa,stroke:#00008b,stroke-width:2px,color:#a9a9a9;
class Cluster outer
58 changes: 58 additions & 0 deletions assets/mermaid/normal-streaming-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
graph TD;
subgraph Cluster[Normal Image Streaming in a Kubernetes Cluster]
subgraph fs-1[Filesystem]
subgraph store-1["Files"]
sf-2[sha256:l2, bytes=10-4500]
end
end

subgraph fs-2[Filesystem]
subgraph store-2["Files"]
sf-6[sha256:l6, bytes=100-1000]
sf-3[sha256:l3, bytes=0-10000]
end
end

subgraph fs-3[Filesystem]
subgraph store-3["Files"]
sf-4[sha256:l4, bytes=90-1000]
sf-5[sha256:l5, bytes=0-700]
end
end

subgraph Node1[Node A]
direction TB
kubelet["kubectl run mcr.microsoft.com/nginx:streamable"]
fs-1

kubelet ~~~ fs-1
end

subgraph Node2[Node B]
fs-2
end

subgraph Node3[Node C]
fs-3
end
end

subgraph Upstream[Upstream Container Registry]
acr(mcr.microsoft.com)
end

Node1 --> |<b style="color:blue">GET sha256:l6<br>bytes=101-500</b>| acr
Node1 --> |<b style="color:blue">GET sha256:l3<br>bytes10-790</b>| acr
Node1 --> |<b style="color:blue">GET sha256:l4<br>bytes=91-500</b>| acr
Node1 --> |<b style="color:blue">GET sha256:l5<br>bytes=0-700</b>| acr
Node1 --> |<b style="color:blue">GET sha256:l1<br>bytes=800-9000</b>| acr
Node1 --> |<b style="color:blue">GET sha256:c1<br>bytes=0-10000</b>| acr

classDef cluster fill:#fafafa,stroke:#bbb,stroke-width:2px,color:#326ce5;
class Node1,NodeN cluster

classDef registry fill:#e0f7fa,stroke:#00008b,stroke-width:2px,color:#326ce5;
class acr registry

classDef outer fill:#e0f7fa,stroke:#00008b,stroke-width:2px,color:#a9a9a9;
class Cluster outer
87 changes: 87 additions & 0 deletions assets/mermaid/peerd-pull-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
graph TD;
subgraph Cluster[Peer to Peer Image Pull in a Kubernetes Cluster]
subgraph ctr-1[Containerd]
subgraph store-1["Content Store"]
sl-2[sha256:l2]
end
end

subgraph ctr-2[Containerd]
subgraph store-2["Content Store"]
sl-6[sha256:l6]
sl-3[sha256:l3]
end
end

subgraph ctr-3[Containerd]
subgraph store-3["Content Store"]
sl-4[sha256:l4]
sl-5[sha256:l5]
end
end

subgraph Node1[Node A]
direction TB
kubelet["kubectl run mcr.microsoft.com/nginx:latest"]
ctr-1

kubelet ~~~ ctr-1
end

subgraph Node2[Node B]
ctr-2
end

subgraph Node3[Node C]
ctr-3
end
end

subgraph manifest-1[mcr.microsft.com/nginx@sha256:m1]
direction TB
c-1[config sha256:c1]
l-1[layer sha256:l1]
l-2[layer sha256:l2]
l-3[layer sha256:l3]
l-4[layer sha256:l4]
l-5[layer sha256:l5]
l-6[layer sha256:l6]

c-1 ~~~ l-1
l-1 ~~~ l-2
l-2 ~~~ l-3
l-3 ~~~ l-4
l-4 ~~~ l-5
l-5 ~~~ l-6
end

subgraph Upstream[Upstream Container Registry]
acr(mcr.microsoft.com)
end

subgraph Legend[Legend]
direction TB
mtls[<b style="color:orange">Pull from Peer</b> - mTLS connections]
tls[<b style="color:blue">Pull from Upstream</b> - TLS connections]

mtls ~~~ tls
end

Legend ~~~ Upstream

Node1 -.-> |<b style="color:orange"><br>GET sha256:l6</b>| sl-6
Node1 -.-> |<b style="color:orange"><br>GET sha256:l3</b>| sl-3
Node1 -.-> |<b style="color:orange"><br><br>GET sha256:l4</b>| sl-4
Node1 -.-> |<b style="color:orange"><br>GET sha256:l5</b>| sl-5

Node1 --> |<b style="color:blue"><br>GET sha256:l1</b>| acr
Node1 --> |<b style="color:blue"><br>GET sha256:c1</b>| acr

classDef cluster fill:#fafafa,stroke:#bbb,stroke-width:2px,color:#326ce5;
class Node1,NodeN cluster

classDef registry fill:#e0f7fa,stroke:#00008b,stroke-width:2px,color:#326ce5;
class acr registry

classDef outer fill:#e0f7fa,stroke:#00008b,stroke-width:2px,color:#a9a9a9;
class Cluster outer
Loading

0 comments on commit 97fabe2

Please sign in to comment.