LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Software

Nostromo Puts Idle Kubernetes Control Planes to Sleep Until Someone Connects

The Go project lets managed Kubernetes providers share one host program across customer clusters while keeping their stored data separate.

Chris Pirillo leans toward a bank of miniature server racks where one indicator has lit up and the neighboring racks are dark.
Illustration: LockerGnome

Run kubectl get namespaces against a sleeping Nostromo cluster and the API server has to start before it can tell you what’s there. If you’re just looking around, the scheduler and controller manager get to stay in bed. Ask Kubernetes to create a pod and both come back to work. Nostromo makes that distinction for each cluster it hosts, so opening the door and moving the furniture get different staffing levels.

Standby is where this gets practical for clusters with worker nodes. The API server stays up when nodes or users are connected, and routine node traffic can keep coming in without waking the scheduler and controller manager. “Node heartbeats do not count,” says the Nostromo README. A heartbeat means the node is still there. If it goes quiet for long enough, Nostromo brings the controllers back up to check on it. Apparently attendance is mandatory when somebody stops showing up.

The clock can keep the controllers on duty, too. A cluster with a CronJob or an autoscaler can have work coming even when nobody has just written anything to the API. The README lists both among the reasons to stay fully awake. Nostromo uses “the upstream binaries, unmodified,” as the project puts it. The unusual bit happens around Kubernetes: Nostromo decides when each of those familiar processes needs to be running.

The laptop benchmarks put twenty sleeping clusters at zero megabytes of per-cluster process memory. The shared Nostromo process still used 16 MB, and etcd used another 92 MB. There’s a useful number for clusters that still have company, too. With two real worker nodes and their system pods, the project measured 287 MB at rest with Nostromo, including its tunnel server, versus 455 MB for the comparison cluster. For a provider whose customers leave nodes connected, that second result is the one to put in the spreadsheet.

A cluster’s very first boot has its own wrinkle. Nostromo normally does what its README calls “the slow one” in the background right after creation, so the first person who connects can get an ordinary wake-up. The project turned that behavior off for its first-boot benchmark. On a busy laptop, eight of 100 first boots went past the test’s 10-second kubectl limit. If a lab provisions clusters right as students sit down, the time between creating a cluster and handing out its credentials suddenly belongs in the lesson plan.

The scale benchmark gets as far as 1,100 clusters defined, with wake-up averaging 2.7 seconds across ten runs. That gives an operator a number for waking a cluster when the host already knows about a lot of them. The next number worth measuring is how the wait changes when a whole room opens its terminals at once. Give everybody the same start time and see who’s still waiting when the instructor gets to the second command.

Bring on the Monday rush.

More Software

Every Software story →