Cresta Software Engineer Interview Experience — Phone Screen Building a Least-Load Job Dispatcher

Cresta·Software Engineer·Sep 2026
Technical Screenmedium

Write a Job Dispatcher-Executor system.

You are tasked with implementing a simple job dispatcher that distributes incoming jobs to a pool of executors (i.e., workers). Each job is represented as an integer (its ID), and executors are dynamically added and removed during runtime.

You must define two classes:

  • Executor – Represents a worker that can accept jobs.
  • LoadBalancer – Maintains a list of executors and distributes jobs to them.

class Executor

Each executor has:

  • A method assign_job(job_id: int) which simply stores the job.
  • A method execute_next_job() which removes the next job from the executor's job store

class JobDispatcher

The job dispatcher has:

  • A method add_executor(executor: Executor) to add an executor.
  • A method remove_executor(executor_id: str) to remove an executor.
  • A method dispatch(job_id: int) to assign a job to one of the executors.
  • A method get_state() that returns a mapping of executor_id → job list.

Pay attention to how you design the dispatch mechanism, because it will affect your final implementation. The strategy is lowest job load > round-robin.

By default the executors all handle the same type of task, so you don't need to think about the actual task-processing logic.

Also, when you remove an executor, remember to take the jobs currently queued on it and redistribute them to the remaining executors.

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Cresta
Role
Software Engineer
Rounds
Technical Screen
Difficulty
medium
Interview date
Sep 2026
Questions from this interview
1 question

Real Cresta interview experiences

First-hand reports from Cresta candidates — the rounds, the questions they were asked, and how it went.

All 6 Cresta interview experiences