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

uber, goldman sachs, rubrik logo
uber, goldman sachs, rubrik
March 13, 2026 · 8 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.

Full Experience

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.

Interview Questions (1)

1.

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

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

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