Service Migrations (Blue-Green), P2P Images & DNS
Starry embeds an intelligent DAG (Directed Acyclic Graph) scheduler enabling zero-downtime service relocation across physical nodes, peer-to-peer image transfers without registry bottlenecks, and automated DNS synchronization.
1. Seamless Blue-Green Service Migration
When a service's target node changes in configuration (e.g. web moves from bocchi to nijika):
services:
web:
image: "nginx:alpine"
node: "nijika" # Was: bocchi
vip: "10.99.10.5"Running starry plan detects the relocation and constructs a BLUE-GREEN DAG step:
starry planExecution Lifecycle:
- P2P Image Pre-delivery: Node
nijikastreams the image directly frombocchiviadocker save | zstd | ssh docker loadwithout downloading layers from external registries. - Mounting Configs & Volumes: Configurations from
filesare written ontonijika. - Start Green Container: The new instance starts on
nijika. - Health Verification: Starry probes the new container's
healthcheckendpoint until green. - Instant VIP Routing Cutover: Once confirmed healthy, Starry updates WireGuard
AllowedIPs: packets destined for10.99.10.5redirect tonijikawithout terminating existing TCP connections! - Blue Container Tear-down: The old container on
bocchiis drained and stopped.
2. Peer-to-Peer Image Streaming (docker save | zstd | ssh load)
When private registries are inaccessible or remote nodes have bandwidth constraints, Starry streams layers peer-to-peer:
- Real-time compression using
zstd -3for maximum throughput with minimal CPU overhead. - Direct delivery through memory pipes over SSH without writing intermediate tar archives to disk.
3. Public DNS Providers (Cloudflare & Webhook)
Starry manages domain records automatically:
Cloudflare (IDnsProvider)
Interacts with Cloudflare API v4 with automatic Zone ID discovery and optional edge proxying (proxied: true):
dns:
provider: "cloudflare"
api_token: "ENC[AES256_GCM:...]"
zone: "example.com"Webhook
Integrates with custom DNS infrastructure (CoreDNS, PowerDNS, Infoblox) by emitting upsert and delete JSON webhooks.