Skip to main content

One post tagged with "rpc"

View All Tags

Inside Flink's Control Plane: How Apache Pekko Powers the RPC Layer

· 21 min read
Arun Lakshman Ravichandran
Software Engineer, AWS

Flink's distributed components must communicate constantly. TaskManagers report task state changes to JobMaster. JobMaster requests slots from ResourceManager. Dispatchers serve REST API queries about job status. All these components access shared state, particularly the ExecutionGraph. Traditional multi-threading with locks would create race conditions, deadlocks, and unmaintainable code. Flink solves this by adopting the Actor Model through the Akka/Pekko framework. Each component processes all requests on a single thread through a FIFO mailbox. This design eliminates concurrency bugs by architecture, not by locks.