durian-hypermediaStyle

All fixtures · From the Format page · format/52-animation-pods-nodes-a-service.dh.md

Source
---
title: "Animation: pods, nodes, a service"
description: A fixture made from the Format page section of the same name.
---

## Animation: pods, nodes, a service

Containers nest: pods in nodes in a cluster. A service is a stable name in front of pods; when a node dies, a pod is started elsewhere.

```animation dir=down
family svc "service"
family web "web pods"
family cache "cache pods"
group cluster "cluster" layout=row
group n1 "node 1" in cluster
group n2 "node 2" in cluster
group n3 "node 3" in cluster
pill w1 "web-1" in n1 is=web
pill c1 "cache-1" in n1 is=cache
pill w2 "web-2" in n2 is=web
pill w3 "web-3" in n3 is=web
pill svc "service: web" is=svc
svc -> w1 is=svc
svc -> w2 is=svc
svc -> w3 is=svc
note svc: one stable name and address in front of the web pods
@step Pods run on nodes; nodes make up the cluster. The service is one name in front of the three web pods.
camera all
@step Calls to the service are spread over its pods: rules on every node pick one.
send "GET /" svc -> w1
send "GET /cart" svc -> w2
@step Node 2 dies, and web-2 with it.
set n2 down=yes
set w2 down=yes
camera cluster
@step The scheduler starts a new web-2 on node 3, which has room.
remove w2
add pill w2b "web-2" in n3 is=web
svc -> w2b is=svc
@step The rules now pick among the running pods only; nobody sees a gap.
send "GET /cart" svc -> w2b
camera all
```
LLM view
---
title: "Animation: pods, nodes, a service"
description: A fixture made from the Format page section of the same name.
source: format/52-animation-pods-nodes-a-service.dh.md
---
<!-- Made by dh llm from the source; nobody edits this file. -->

## Animation: pods, nodes, a service

Containers nest: pods in nodes in a cluster. A service is a stable name in front of pods; when a node dies, a pod is started elsewhere.

Animation, 5 steps. Starts with: group cluster [group n1 "node 1" [pill w1 "web-1", pill c1 "cache-1"], group n2 "node 2" [pill w2 "web-2"], group n3 "node 3" [pill w3 "web-3"]]; pill svc "service: web". Connected: svc -> w1, svc -> w2, svc -> w3. Families, one colour each: svc "service" (svc, svc -> w1, svc -> w2, svc -> w3); web "web pods" (w1, w2, w3); cache "cache pods" (c1).

1. Pods run on nodes; nodes make up the cluster. The service is one name in front of the three web pods.
2. Calls to the service are spread over its pods: rules on every node pick one.
   svc -> w1: GET /
   svc -> w2: GET /cart
3. Node 2 dies, and web-2 with it.
4. The scheduler starts a new web-2 on node 3, which has room.
5. The rules now pick among the running pods only; nobody sees a gap.
   svc -> w2b: GET /cart

Animation: pods, nodes, a service

Containers nest: pods in nodes in a cluster. A service is a stable name in front of pods; when a node dies, a pod is started elsewhere.

Animation, 5 steps. Starts with: group cluster [group n1 "node 1" [pill w1 "web-1", pill c1 "cache-1"], group n2 "node 2" [pill w2 "web-2"], group n3 "node 3" [pill w3 "web-3"]]; pill svc "service: web". Connected: svc -> w1, svc -> w2, svc -> w3. Families, one colour each: svc "service" (svc, svc -> w1, svc -> w2, svc -> w3); web "web pods" (w1, w2, w3); cache "cache pods" (c1). 1. Pods run on nodes; nodes make up the cluster. The service is one name in front of the three web pods. 2. Calls to the service are spread over its pods: rules on every node pick one. svc -> w1: GET / svc -> w2: GET /cart 3. Node 2 dies, and web-2 with it. 4. The scheduler starts a new web-2 on node 3, which has room. 5. The rules now pick among the running pods only; nobody sees a gap. svc -> w2b: GET /cart

  • service
  • web pods
  • cache pods
clusterclusternode 1node 1node 2node 2node 3node 3web-1web-1cache-1cache-1web-2web-2web-3web-3service: web · one stable name and address in front of the web podsservice: web
1Pods run on nodes; nodes make up the cluster. The service is one name in front of the three web pods.
1 / 5
All steps (5)