The Cluster: Who Plans, Who Works

Your database was one engine: it read your statement, planned the work, ran it, and handed back rows, all inside one process on one machine. Spark takes that single role and splits it across three separate actors. Get these three straight and most of Spark stops being mysterious, because every later idea in this lesson is really a statement about one of them. The driver is the process that runs your program: it holds your code, turns it into a plan, and decides what work needs doing. There is exactly one driver per job, and it is the only part of the system that sees the whole picture. The executors are separate processes, usually on separate machines, that do the actual data crunching. A real cluster has many of them, and they do all the heavy lifting. The cluster manager is the layer tha

About This Interactive Section

This section is part of the How a Spark Job Runs lesson on DataDriven, a free data engineering interview prep platform. Each section includes explanations, worked examples, and hands-on code challenges that execute in real time. SQL queries run against a live PostgreSQL database. Python runs in a sandboxed Docker container. Data modeling problems validate against interactive schema canvases. All content is framed around what data engineering interviewers actually test at companies like Meta, Google, Amazon, Netflix, Stripe, and Databricks.

How DataDriven Lessons Work

DataDriven combines four interview rounds (SQL, Python, Data Modeling, Pipeline Architecture) with adaptive difficulty and spaced repetition. Easy problems get harder as you improve. Weak concepts resurface until you master them. Your readiness score tracks progress across every topic interviewers test. Every lesson section ends with problems you solve by writing and running real code, not by picking multiple-choice answers.