KatInterview

Designing a Bot Dispatch Service for Joining Online Meetings

System DesignModel answer
MediumModel answerSystem Designsystem-designqueuesleases

Last updated

Design the backend between a web UI and a pool of meeting-joining bots that safely assigns bots, tracks session state, and recovers from failures at 100K concurrent sessions.

Bot Dispatch for Online Meetings

A product lets users paste a meeting link (Zoom, Google Meet, Teams, WebEx and similar) into a web page. A bot from a shared pool must then join that meeting, and the user must see the bot's progress live in the browser.

The web UI and the bots already exist. You are designing the service in the middle: it accepts requests, assigns bots, tracks session state, and pushes updates back to the UI.

Functional requirements

  • A user submits a meeting URL and, optionally, credentials (for example a passcode or a login for the meeting).
  • The service acknowledges the request asynchronously; the user does not wait for the join to complete.
  • Exactly one idle bot is assigned to each request. Assignment must be atomic, so two requests never get the same bot and one request never gets two bots.
  • The user sees the session move through states such as queued, assigned, joining, joined, and finally one of failed, disconnected, or ended.

Scale

  • Up to 100,000 concurrent meetings.
  • About 1 million meetings per day.

Reliability constraints

  • Once a request is acknowledged, it must never be silently lost.
  • Messages can be delivered more than once.
  • Bots can crash or lose connectivity in the middle of a session.

What to cover

Walk through requirements and clarifying questions, the API, the data model, how you keep assignment consistent, how you scale, how you recover from failures, how you handle running out of bots, and how you observe the system. Call out the main trade-offs.

Questions worth raising with the interviewer: Are credentials stored or just passed through? How fresh must the state shown in the browser be?

Hints

Hint 1

Persist the request before you acknowledge it, then drive everything else from that durable record. Think about what the acknowledgment actually promises.

Hint 2

Treat bot ownership as a time-limited lease that the bot must keep renewing with heartbeats. A missed renewal is how you detect a dead bot without guessing.

Hint 3

Assume every message can arrive twice. Give each request an idempotency key and make every state transition a conditional update, such as compare-and-set on a version or current state.

Hint 4

Separate the control plane (requests, assignments, state) from the streaming path to the browser, and size them separately: 1M/day is about 12 requests per second on average, but 100K live sessions means a lot of long-lived connections and heartbeats.