Uber | Goldman Sachs | Rubrik LLD Interview Question : Design Scheduled Executor

Posted
13 Mar 2026
337 reads

Summary

I encountered a challenging low-level design question focused on designing a custom ScheduledThreadPoolExecutor, which is frequently asked by companies like Uber, Goldman Sachs, and Rubrik to assess senior engineering skills.

How it went

The interview question required designing a custom ScheduledThreadPoolExecutor or ScheduledExecutorService from scratch. This is a classic concurrency problem commonly seen in interviews for senior engineering roles.

Key Concepts:

  • Thread pool with worker threads
  • DelayQueue to hold tasks ordered by next execution time
  • Delayed interface for time‑based ordering
  • Scheduling strategies:
    • schedule after initial delay
    • schedule at fixed‑rate
    • schedule at fixed‑delay
  • Thread safety and rescheduling logic

Solution Overview:

  1. Use a DelayQueue to store ScheduledTask objects (implements Runnable + Delayed).
  2. Worker threads loop, calling take() – this blocks until a task’s delay expires.
  3. Once executed, if the task is periodic, update its next trigger time and put it back into the queue.
  4. For fixed‑rate, next trigger = previous trigger + period;
  5. for fixed‑delay, next trigger = current time + delay.
  6. Shutdown interrupts workers and clears the queue.

Questions asked (1)

  1. 01

    Design Scheduled Executor Service

    System Design · Hard

    Design a custom ScheduledThreadPoolExecutor or ScheduledExecutorService from scratch – a classic concurrency problem asked by Uber, GS, and Rubrik to test senior engineering skills.

    Key Concepts:

    • Thread pool with worker threads
    • DelayQueue to hold tasks ordered by next execution time
    • Delayed interface for time‑based ordering
    • Scheduling strategies:
      • schedule after initial delay
      • schedule at fixed‑rate
      • schedule at fixed‑delay
    • Thread safety and rescheduling logic

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Uber, Goldman Sachs, Rubrik recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!