← Salesforce Interview Insights

Salesforce·Backend Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jul 2026

Summary

Salesforce backend round, one big system design question about elevators. Felt like a classic OOP design problem but with enough scheduling complexity to keep you on your toes for the full hour.

Questions Asked (1)

Q1

Design an object-oriented elevator control system for a building with multiple floors and multiple elevators. The system should handle hall requests from floors, cabin requests from inside elevators, track elevator state, assign requests to elevators, and schedule movement efficiently.

System DesignTechnical Trade-offsData Modeling
Author's notes

Spent the first few minutes just listing classes out loud, ElevatorCar, FloorRequest, Dispatcher, Door, that kind of thing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then define the core objects and their responsibilities. Focus on the request handling and scheduling algorithm, discussing trade-offs between simplicity and efficiency. Conclude with how you would handle concurrency and scalability.

Pro tip: Demonstrate awareness of real-world constraints like elevator capacity, energy efficiency, and peak traffic patterns. Mentioning how you would simulate or test the system shows practical engineering maturity.

1. Clarify Requirements and Scope

Ask questions to understand building size, number of elevators, traffic patterns, and any special constraints (e.g., VIP floors, emergency mode). Define functional and non-functional requirements.

2. Identify Core Objects and Responsibilities

Define classes such as Elevator, Floor, Request, Scheduler, and Building. Assign clear responsibilities: Elevator tracks state and moves, Scheduler assigns requests, Building manages floors and elevators.

3. Design Request Handling and Scheduling

Describe how hall requests (up/down) and cabin requests (destination floors) are represented and queued. Explain the scheduling algorithm (e.g., SCAN, LOOK, or custom) and how requests are assigned to elevators based on proximity, direction, and load.

4. Address Concurrency and State Management

Discuss how to handle simultaneous requests and state changes safely. Mention locking, message queues, or event-driven design to avoid race conditions and ensure consistency.

5. Discuss Trade-offs and Scalability

Compare scheduling algorithms (e.g., FCFS vs. SCAN) in terms of wait time, throughput, and fairness. Explain how the design scales with more floors/elevators and how to optimize for peak traffic.

Key Points to Mention

  • Elevator state (idle, moving up/down, doors open/closed) and direction
  • Request types: hall calls (floor + direction) and cabin calls (destination floor)
  • Scheduling algorithm (e.g., SCAN/LOOK) and request assignment strategy
  • Concurrency handling (locks, queues, event-driven architecture)
  • Trade-offs between different scheduling algorithms (wait time, throughput, energy)
  • Scalability considerations (more elevators, floors, peak traffic patterns)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.