Section 6: A Master That Never Touches a Tuple - High-Level Architecture
Executive Summary: Two planes that fail differently. The control plane is Nimbus (accepts topologies, computes assignments), ZooKeeper (stores assignments and heartbeats) and a supervisor on each of 12 machines (starts and restarts workers to match). The data plane is 48 worker JVMs running about 100 executor threads, which run tasks and pass tuples through in-worker queues or over the network. Ackers are ordinary bolts on that plane. Nimbus never sees a tuple, so a running topology keeps counting when Nimbus dies, which is the 2014 paper's design and the property this section defends.
Interviewer: "You've sized it at about a hundred executors on twelve machines. Put the boxes on the board."
You: "Two planes. One decides where code runs; the other moves tuples. I'll keep them apart, because if the thing that decides placement also forwards data, its outage stops the counting. Then I'll follow post p-77120 through the data path."
The Boxes on the Board
| Component | Count (our assumption) | Owns | Never does |
|---|---|---|---|
| Nimbus | 1 (HA in later releases) | Topology submission, the code jar, scheduling, writing assignments | Forward, buffer or inspect a tuple |
| ZooKeeper ensemble | 3 or 5 nodes | Assignments, supervisor and worker heartbeats | Carry tuples |
| Supervisor | 12 (one per machine) | Starting, stopping and restarting the workers it is assigned | Decide placement |
| Worker (JVM) | 48 (in 60 slots: 5 × 12) | A receive thread, a send thread, its executors | Run executors from two topologies |
| Executor (thread) | ≈ 100 (16 + 40 + 16 + 16 + 1 + 12) | A loop over its incoming queue | Run tasks of two components |
| Task | ≥ 1 per executor | One instance of a spout or bolt's code | Exist outside an executor |
| Acker | 12 executors | Each pending tuple tree's 20-byte XOR entry | Need any special plane |
The last row is the quiet surprise: ackers are bolts the framework adds to your topology, scheduled and restarted like everything else. Section 8 opens one up.
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson