Model Facebook Event RSVPs With Capacity and a Waitlist

Last updated: November 29, 2026

Quick Overview

Design classes for a Facebook Event that supports Going, Interested and Not Going responses, a capacity limit, and a first-come waitlist that automatically promotes people when spots open or capacity grows.

Meta
Software Engineering Fundamentals
Software Engineer
Meta
November 29, 2026
Software Engineer
Onsite
Software Engineering Fundamentals
Medium

0

0

0 solved


Design classes for a Facebook Event that supports Going, Interested and Not Going responses, a capacity limit, and a first-come waitlist that automatically promotes people when spots open or capacity grows.

Object-oriented design questions in Meta onsites tend to use familiar product surfaces like Events, Groups or Marketplace, and this one checks whether you can model states and transitions cleanly. The interviewer wants a small, testable core that keeps invariants (never over capacity, FIFO promotion) and exposes hooks for notifications.

What the Interviewer Expects
  • Defines an explicit status enum and treats every response as a state transition
  • Keeps the invariant that going count never exceeds capacity after any operation
  • Promotes from the waitlist in strict arrival order using an ordered structure
  • Emits change events so notifications are decoupled from the core model
  • Handles capacity shrink without evicting confirmed attendees, and explains the choice
Key Topics to Cover
object-oriented design
state machines
invariants
observer pattern
FIFO queues
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How would you persist this so two servers accepting RSVPs at once cannot overbook?
  • How would you give the host priority invites that bypass the waitlist?
  • Should a waitlisted user who switches to Interested keep their place if they come back?
  • How would you add a deadline after which promotions stop?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Responses: Going, Interested, None (removed). Going beyond capacity puts the user on a waitlist.
  • When a Going user leaves or the host raises capacity, the earliest waitlisted users are promoted. -...
High-Level Design

One Event class owns three collections: a going set, an OrderedDict waitlist (insertion order is arrival order, with O(1) removal from the middle when someone withdraws) and an interested set....


Submit Your Answer
Markdown supported