Amazon Locker System Design Explained
Learn how Amazon Locker balances security, capacity, and physical constraints. This deep dive breaks down locker reservation, pickup codes, expiration handling, and scalable last-mile delivery design.
Amazon Locker System Design is the architectural challenge of coordinating digital order workflows with physically constrained, shared pickup infrastructure that must handle secure access, capacity prediction, and real-world hardware failures. It represents a compelling system design problem because it forces you to reason about resource contention, time-bound reservations, IoT communication, and ML-driven demand forecasting in a single coherent architecture.
Key takeaways
- Physical-digital coordination: Amazon Locker systems must synchronize software state with real-world hardware that can fail, go offline, or behave unpredictably.
- Dwell time forecasting: Predicting how long packages occupy compartments using ML models like random forest regression is critical to avoiding overbooking and maximizing utilization.
- Compartment state machines: Every locker slot follows a strict life cycle from available to reserved to occupied to expired, and edge cases at each transition define system reliability.
- IoT and offline resilience: Locker hardware communicates over lightweight protocols like MQTT and must cache credentials locally to function during network outages.
- Conservative reservation strategy: The system deliberately sacrifices peak utilization to preserve customer trust, because a failed pickup is far more costly than an unused slot.
Most engineers think of Amazon Locker as a convenience feature, a metal cabinet where you punch in a code and grab your package. But behind that 15-second interaction sits a system that must predict demand hours in advance, manage thousands of physically constrained slots across cities, handle hardware that loses power or connectivity, and guarantee that every customer finds exactly the right compartment open at exactly the right time. Get any of that wrong, and you have a stranded package, a blocked compartment, and an angry customer. This is what makes Amazon Locker one of the most instructive system design problems in modern engineering interviews, and the reason it deserves a much deeper look than most guides provide.
Understanding the core problem#
At its foundation, Amazon Locker is a last-mile delivery alternative. Instead of routing a package to a customer’s doorstep, the system routes it to a shared, self-service pickup location composed of a finite number of physical compartments in varying sizes.
This introduces constraints that don’t exist in traditional delivery. A doorstep can receive unlimited packages, but a locker location has a hard ceiling. Each compartment holds exactly one package at a time, and that package must physically fit. Deliveries happen hours or days after checkout, so availability at selection time may not reflect availability at drop-off time.
The system must continuously answer a chain of dependent questions. Is there a locker near the customer? Will a compartment of the right size be free when the driver arrives? Has the customer picked up their package? What happens if they haven’t? These questions tie together order management, inventory-like capacity tracking, secure credential generation, and time-based life cycle workflows.
Real-world context: Amazon operates locker stations at grocery stores, convenience shops, apartment complexes, and transit hubs. Each location has wildly different usage patterns, making a one-size-fits-all capacity model impractical.
Unlike purely digital systems where scaling means adding servers, scaling a locker network means installing physical hardware with long lead times and fixed capacity. This is the tension at the heart of the design: digital flexibility meeting physical rigidity.
Before diving into subsystems, it helps to establish what exactly the system must do and under what constraints it must operate.
Functional requirements#
To ground the design, we start with concrete capabilities the system must support across three user types: customers, delivery drivers, and operations teams.
Customer-facing requirements:
- Locker discovery: Surface eligible locker locations during checkout based on proximity, compartment availability, and package dimensions.
- Pickup code delivery: Send a unique, time-limited access credential after the package is deposited.
- Self-service retrieval: Allow the customer to authenticate at the kiosk and open the correct compartment without human assistance.
Driver-facing requirements:
- Drop-off assignment: Direct the driver to a specific compartment at a specific location with a clear authentication flow.
- Failure fallback: Provide an alternative delivery path if the locker is full, offline, or malfunctioning.
Operations requirements:
- Expiration handling: Automatically reclaim compartments when pickup windows expire and schedule package retrieval.
- Capacity monitoring: Track real-time and predicted utilization per location for routing and planning decisions.
Attention: It’s tempting to model this like a hotel reservation system. But hotels overbook intentionally because cancellations are common. Amazon Locker must aggressively avoid overbooking, because a driver standing in front of a full locker with a package has no good options.
What makes this system particularly interesting is that lockers behave like shared, constrained resources with time-bound ownership, similar to airline seats, but with physical hardware that can fail independently.
The functional surface is deceptively simple. What truly shapes the architecture are the non-functional requirements hiding beneath it.
Non-functional requirements that shape the design#
Amazon Locker System Design is driven more by non-functional constraints than by feature complexity. These constraints determine nearly every architectural trade-off.
Security is the top priority. Locker access codes must be cryptographically unguessable and tightly scoped to a single compartment and time window. A leaked or reused code could expose someone else’s package. Access attempts, both successful and failed, must be logged for audit trails.
Availability accuracy matters more than raw uptime. Showing a locker as available when it isn’t creates a cascade of costly failures: a driver makes a wasted trip, a package gets rerouted, and a customer’s delivery is delayed. The system must prefer showing fewer options over showing incorrect ones.
Reliability under hardware failure is essential. Lockers are deployed in unattended locations. They lose power, lose network, and have mechanical door failures. The system must tolerate all of these gracefully, without human intervention for routine cases.
The following table compares how each non-functional requirement maps to a specific design decision.
Non-Functional Requirements Mapped to Design Decisions
Requirement | Design Impact | Trade-off |
Security – Time-limited codes & audit logging | Ensures access codes expire after use; maintains activity logs for monitoring and compliance | Codes expiring before use cause inconvenience; audit logging increases storage and performance overhead |
Availability Accuracy – Conservative capacity estimates | Handles unexpected demand surges, maintaining high availability | Overestimated capacity leads to resource underutilization and higher operational costs |
Reliability – Offline caching & local authentication | Enables system operation during network outages by storing data and authenticating locally | Local data introduces security risks if unmanaged; ensuring consistency between local and central systems is complex |
Scalability – Regional isolation of locker state | Regions operate independently, reducing bottlenecks and improving scaling efficiency | Data fragmentation complicates cross-region aggregation; increases deployment and maintenance complexity |
Latency Tolerance – Eventual consistency over real-time sync | Improves performance and scalability through asynchronous data updates | Users may temporarily see outdated information, impacting trust and experience |
Pro tip: In interviews, explicitly stating that you prioritize correctness over latency for this system is a strong signal. Customers tolerate an extra second at checkout. They don’t tolerate arriving at an empty locker.
With these constraints established, we can now examine how the system decomposes into cooperating subsystems.
High-level architecture overview#
At a high level, the Amazon Locker system decomposes into six major subsystems, each owning a distinct concern and communicating through well-defined interfaces.
- Locker Discovery Service: Handles location search, eligibility filtering, and availability estimation during checkout.
- Capacity Reservation Service: Manages time-bound slot reservations, delivery speed tier allocation, and overbooking avoidance.
- Order-to-Locker Assignment Engine: Coordinates between the order management system and the reservation layer to bind a specific package to a specific compartment.
- Secure Access Service: Generates and validates pickup codes and QR tokens, manages credential expiry, and logs access events.
- Driver Interaction Service: Authenticates drivers at kiosks, assigns compartments at drop-off time, and handles hardware failure fallbacks.
- Pickup and Expiration Service: Tracks pickup windows, triggers notifications, manages expired package retrieval, and reclaims compartments.
The following diagram illustrates how these subsystems interact across the package life cycle.
Each subsystem deals with a different type of state: digital orders, physical compartments, time-based reservations, and security credentials. Keeping these concerns separated is what allows the system to scale independently per axis and isolate failures at individual locations.
Historical note: Amazon filed US Patent 11526838B1 describing a capacity management system that partitions locker slots by delivery speed tier and uses ML components to predict demand and dwell time distributions. This patent reflects the architectural separation between reservation logic and physical state management.
Let’s trace the package life cycle from the customer’s first interaction: discovering and selecting a locker at checkout.
Locker discovery and selection#
The customer journey begins when a user selects “Amazon Locker” as a delivery option during checkout. The system must instantly surface nearby locker locations that are eligible for the specific order being placed.
Eligibility depends on multiple factors evaluated together:
- Proximity: The locker must be within a reasonable distance of the customer’s address or preferred area.
- Operating hours: The locker must be accessible during the expected delivery and pickup windows.
- Compartment fit: At least one compartment at the location must be large enough to hold the package, based on the item’s shipping dimensions.
- Predicted availability: A compartment of the right size must be likely available at the projected delivery time, not just right now.
This is a read-heavy operation. Locker metadata (location, hours, compartment size distribution) changes infrequently and can be aggressively cached. But real-time availability fluctuates throughout the day as packages are deposited and collected. The system typically shows
Attention: Showing a locker as available and then rejecting it during reservation is a poor user experience. The system should lean toward hiding borderline-available lockers rather than overpromising.
To support fast lookups, locker locations are typically indexed in a geospatial data structure (such as a geohash-based index or R-tree) that supports radius queries. The discovery service filters results by size compatibility and applies an availability threshold before returning options to the checkout UI.
The key design principle here is pessimistic surfacing: it’s better to show fewer lockers than to create an expectation the system can’t fulfill. This directly preserves customer trust, which we’ll revisit later.
Once the customer selects a location, the system must actually secure a compartment. This is where capacity reservation gets complex.
Capacity reservation and demand forecasting#
Capacity reservation is the hardest part of Amazon Locker System Design. The system must guarantee that a suitable compartment will be available at the time of delivery, which may be hours or days after checkout. In the intervening time, other packages arrive, get picked up, or expire. The locker’s state is a moving target.
Why naive reservation fails#
A simple approach would be to mark a specific compartment as reserved at checkout time and hold it until delivery. But this wastes capacity. If a same-day delivery reserves a slot 8 hours early, that slot sits empty while other packages could have used it. Conversely, if the system doesn’t reserve anything and just hopes a slot will be free, drivers arrive at full lockers.
The core tension is between utilization (keeping slots full and productive) and reliability (ensuring every reserved delivery actually has a slot). Amazon’s approach, as described in SIAM’s capacity management research, resolves this through probabilistic forecasting.
Dwell time modeling#
The critical variable is
Dwell time depends on several factors:
- Delivery speed tier: Same-day customers tend to pick up faster than two-day customers.
- Location type: Lockers at commuter stations see evening pickup spikes. Lockers at grocery stores see more distributed patterns.
- Day of week and seasonality: Weekend pickups lag behind weekday pickups.
Amazon’s patent (US11526838B1) describes using
With dwell time predictions, the reservation system can calculate expected compartment turnover:
$$\\text{Available}t = \\text{Current_Free} + \\sum{i} P(\\text{pickup}i \\leq t) - \\text{Incoming_Deliveries}t$$
This lets the system accept or reject new reservations based on the probability that enough slots will be free, not just the current snapshot.
Delivery speed tier partitioning#
Not all deliveries are equal. Same-day deliveries have short dwell times and high urgency. Two-day deliveries have longer, less predictable dwell times. The system partitions available capacity across these
For example, a locker with 100 compartments might allocate:
- 30% reserved for same-day (high turnover, high priority)
- 50% for next-day
- 20% buffer for overflow and error recovery
These ratios are tuned per location using historical demand data. SIAM’s research reports that this approach improved forecast accuracy by approximately 16% compared to uniform allocation.
Pro tip: In an interview, mentioning that you’d partition capacity by delivery speed tier and use dwell time predictions to avoid overbooking demonstrates production-level awareness. You don’t need to derive the ML model, just show you know why it matters.
The reservation system deliberately errs on the conservative side. It would rather reject a locker delivery (falling back to doorstep delivery) than accept one it can’t fulfill. This asymmetry is intentional: the cost of a failed pickup far exceeds the cost of a missed upsell.
With a reservation confirmed, the next challenge is what happens when the driver physically arrives at the locker.
Delivery driver interaction and drop-off#
When the delivery driver reaches the locker location, the system transitions from planning to real-time execution. This phase has the tightest latency requirements in the entire flow, because drivers operate on strict route schedules and cannot afford long waits.
The drop-off workflow proceeds in a defined sequence:
- Driver authentication: The driver identifies themselves at the locker kiosk, typically through a barcode scan or app-based credential linked to their delivery route.
- Compartment assignment: The system selects a specific compartment that matches the package’s size from the pool reserved for this delivery. Note that the exact compartment may not have been determined until this moment; only the capacity was reserved.
- Door opens: The kiosk signals the locker hardware to unlock the assigned compartment.
- Package deposit: The driver places the package inside.
- Confirmation: The door closes, a sensor confirms the deposit, and the compartment state transitions from “reserved” to “occupied.”
This entire sequence should complete in under 30 seconds. The driver’s app receives confirmation, and the customer is notified that their package is ready with a pickup code.
Real-world context: In practice, Amazon delivery drivers handle dozens of locker drop-offs per route. Even a 60-second delay per locker compounds into significant route disruption. That’s why the system pre-computes compartment assignments and caches them locally on the locker controller.
Failures during drop-off are inevitable. The most common failure modes include:
- Mechanical door failure: The compartment doesn’t open. The system must immediately assign an alternative compartment or flag the location.
- Network outage: The locker can’t reach the backend. The local controller must have enough cached state to authenticate the driver and assign a compartment autonomously.
- Size mismatch: The package doesn’t fit despite dimensional estimates. The driver marks it as undeliverable, triggering a reroute.
If a drop-off fails entirely, fallback workflows route the package to an alternative locker, back to the delivery van for doorstep delivery, or into a customer service queue. Designing these fallback paths explicitly is what separates a whiteboard sketch from a production system.
The moment a package is successfully deposited, the system must generate a secure credential and manage the compartment through its remaining life cycle.
Locker state management and the compartment state machine#
Each locker location maintains detailed internal state for every compartment. This state must be accurate enough to drive critical decisions (reservation, drop-off, pickup, expiration) while tolerating the reality that physical hardware is imperfect.
The compartment state machine#
Every compartment follows a well-defined life cycle with five states:
- Available: Empty and ready for a new reservation.
- Reserved: Allocated for an incoming delivery but not yet physically occupied. Time-bound so stale reservations auto-expire.
- Occupied: Contains a package. A pickup code is active.
- Expired: The pickup window has elapsed. The package awaits retrieval by operations.
- Maintenance: The compartment is offline due to hardware failure, cleaning, or inspection.
Compartment State Transitions
Current State | Trigger Event | Next State | System Action |
Available | Reservation confirmed | Reserved | Decrement available count |
Reserved | Reservation timeout with no delivery | Available | Release slot and notify |
Reserved | Driver deposits package | Occupied | Generate pickup code and notify customer |
Occupied | Customer picks up package | Available | Log pickup and clear slot |
Occupied | Pickup window elapses | Expired | Schedule retrieval and notify customer |
Expired | Operations retrieves package | Available | Clear slot |
Any | Hardware fault detected | Maintenance | Take offline and alert operations |
State transitions originate from two fundamentally different sources: software events (reservation confirmations, timeout timers) and physical hardware signals (door sensors, weight sensors, connectivity status). Because hardware can fail silently or report stale data, the system must run periodic
Attention: A compartment that the software thinks is “available” but physically contains a forgotten item will cause the next driver to find a blocked slot. Reconciliation runs must compare sensor data (weight, door status) against the expected software state at regular intervals.
The design favors eventual consistency with strong reconciliation over strict real-time guarantees. Physical systems are inherently imperfect, and demanding synchronous consistency from a locker with intermittent connectivity would create brittleness without meaningful benefit.
State accuracy directly feeds into the security layer, because pickup codes must be bound to a specific compartment in a specific state. Let’s look at how access control works.
Secure access and pickup codes#
Security is a defining aspect of Amazon Locker System Design. The system must ensure that only the intended customer can open the correct compartment, without any human intermediary, in an unattended physical location.
Once a package transitions to “occupied,” the Secure Access Service generates a credential for the customer. This credential takes one of two forms: a numeric pickup code (typically 6 digits) or a QR token delivered via email or the Amazon app.
The credential must satisfy strict properties:
- Cryptographic uniqueness: The code space must be large enough that brute-forcing is impractical within the validity window.
- Time-bound validity: The code expires when the pickup window closes or immediately after a successful pickup, whichever comes first.
- Compartment binding: The code maps to exactly one compartment at one location. It cannot be replayed at a different locker.
- Single-use: After a successful pickup, the code is permanently invalidated.
When the customer arrives, they enter the code at the kiosk. The locker controller validates it, either by querying the backend or by checking against a locally cached credential set. On successful validation, the correct door opens, and the system logs the pickup event with a timestamp.
Pro tip: In an interview, mention that pickup codes should be validated locally on the locker controller with a cached credential list. This ensures pickups work even during network outages, a common scenario for kiosks in basements or parking garages.
All access attempts, both successful and failed, must be logged and auditable. Repeated failed attempts from the same kiosk trigger alerts to detect tampering or unauthorized access.
The local caching of credentials introduces a secondary concern: how does the locker controller receive these codes securely? This is where IoT communication protocols become critical.
IoT communication and offline resilience#
Each Amazon Locker kiosk is an IoT edge device. It must communicate with backend services to receive reservation data, pickup credentials, and firmware updates while also operating autonomously during connectivity disruptions.
Protocol selection#
The choice of communication protocol between the locker controller and the backend has significant implications.
Comparison of IoT Communication Protocols for Locker Systems
Protocol | Latency | Bandwidth | Offline Support | Best For |
MQTT | Low | Very Low | Supports store-and-forward queuing | Real-time state updates and credential pushes |
HTTPS | Moderate | Moderate | No native offline support | Batch synchronizations and firmware updates |
WebSocket | Low | Moderate | Connection-dependent; less reliable | Interactive kiosk sessions in stable network environments |
MQTT (Message Queuing Telemetry Transport) is the dominant choice for locker-to-backend communication. It was designed for constrained devices with unreliable networks. Its publish-subscribe model allows the backend to push credential updates and state commands to specific lockers, while lockers publish sensor data and event logs back.
Offline mode and local authentication#
When network connectivity drops, the locker must continue functioning. This requires:
- Local credential cache: The controller stores all active pickup codes for its compartments. Customers can still authenticate and pick up packages.
- Event queue: Drop-off confirmations, pickup logs, and state changes are queued locally and flushed to the backend when connectivity resumes.
- Stale reservation handling: If the controller hasn’t received updates for an extended period, it enters a degraded mode where new reservations are paused but existing pickups continue.
Real-world context: Lockers deployed in underground parking garages or inside thick-walled buildings frequently lose cellular connectivity. Amazon’s locker controllers include local storage and processing specifically to handle multi-hour outages without customer impact.
Device security is equally important. Each locker controller authenticates to the backend using
With the communication layer defined, the remaining life cycle concern is what happens when a customer doesn’t show up.
Pickup windows and expiration handling#
Locker pickups are time-bound. Customers typically have a window of 3 to 7 days to collect their package. If the pickup window expires, the system must automatically reclaim the compartment to preserve capacity for other deliveries.
Expiration handling is a multi-step automated workflow:
- Pre-expiration reminders: The system sends notifications (email, push) at defined intervals (e.g., 24 hours before expiry) to prompt pickup.
- Expiration trigger: A background scheduler detects that the pickup window has elapsed and transitions the compartment from “occupied” to “expired.”
- Credential invalidation: The pickup code is immediately revoked.
- Retrieval scheduling: The system creates a task for a return logistics driver to collect the expired package on their next route through the area.
- Order state update: The order management system is notified. Depending on policy, the customer receives a refund or the package is returned to the fulfillment center.
- Compartment reclamation: Once the package is physically removed, the compartment transitions back to “available.”
This life cycle is analogous to TTL (time-to-live) handling in distributed caches, but with physical consequences. A cache entry that expires is simply deleted. A locker compartment that expires still contains a physical object that must be retrieved before the slot is reusable.
Historical note: Early locker deployments used longer pickup windows (up to 14 days), but Amazon shortened them after observing that extended windows significantly reduced effective capacity without improving pickup rates. Most customers pick up within 48 hours.
The expiration system must be both timely and reliable. A missed expiration leaves a compartment blocked. A premature expiration angers a customer who was about to pick up. The scheduler must handle clock skew across distributed locker controllers and use the backend’s authoritative timestamp for expiration decisions.
Expiration handling also connects directly back to capacity forecasting. The dwell time models from the reservation system predict how many packages will expire vs. get picked up, feeding into the availability calculations we discussed earlier.
Even with all happy paths covered, a production system must account for the many things that go wrong.
Failure handling and edge cases#
Failures in an Amazon Locker system aren’t exceptional. They’re routine. Hardware degrades, networks drop, customers forget codes, and drivers make mistakes. The system’s quality is defined less by how it handles the happy path and more by how gracefully it manages the unhappy ones.
Hardware failures:
- A compartment door jams mechanically. The controller marks it as “maintenance” and alerts operations. If the compartment was reserved, the reservation is reassigned.
- A kiosk touchscreen fails. The system must support fallback entry methods (e.g., mobile app unlock via Bluetooth or NFC).
Connectivity failures:
- The locker loses network for hours. Local caching allows pickups to continue. Drop-offs proceed using pre-cached reservation data. All events are reconciled once connectivity resumes.
Human errors:
- A driver deposits a package in the wrong compartment. The system detects the mismatch through weight or dimension sensors and flags it for manual resolution.
- A customer enters the wrong code repeatedly. After a threshold (e.g., 5 failed attempts), the kiosk locks out further attempts and directs the customer to support.
Timing conflicts:
- Two drivers arrive simultaneously for different compartments. The kiosk controller must serialize compartment access to prevent race conditions.
- A customer arrives during a driver’s active drop-off session. The system queues the pickup request until the drop-off completes.
Attention: Idempotency matters here. If a driver’s drop-off confirmation is lost due to a network glitch and the driver retries, the system must not assign a second compartment. Every state transition should be. idempotent A property ensuring that performing the same operation multiple times produces the same result as performing it once, critical for safely retrying operations after communication failures.
Designing these failure flows explicitly in an interview demonstrates production-level thinking. Interviewers want to see that you’ve internalized the principle that distributed systems fail constantly and that the architecture anticipates it.
The challenge of failure handling compounds when the system operates across hundreds of cities with different usage patterns.
Scaling across cities and regions#
Amazon Locker deployments vary wildly by geography. Dense urban areas have high demand, rapid turnover, and constrained physical space. Suburban locations see moderate but predictable usage. Rural locations might serve only a few packages per day.
The architecture handles this through regional isolation. Locker state and capacity management are scoped to individual locations or regional clusters. There’s no global lock or central authority that must be consulted for every reservation or state transition.
Global services handle concerns that genuinely need centralization:
- Order integration: The order management system is global, but it delegates locker-specific decisions to regional capacity services.
- Security credential generation: Cryptographic key management is centralized, but credential validation is distributed to locker controllers.
- Analytics and ML training: Demand forecasting models are trained centrally on aggregated data but deployed regionally with location-specific parameters.
This model ensures that a power outage at a locker in Seattle doesn’t affect reservations in Chicago. It also allows each region to tune capacity allocation, pickup windows, and expiration policies to local demand patterns.
Pro tip: In an interview, frame regional isolation as a blast radius strategy. If a regional service fails, only that region’s lockers are affected. This is the same principle behind AWS Availability Zones, applied to physical infrastructure.
Regional scaling also simplifies compliance. Different cities or countries may have different rules about package storage duration, data retention, or locker placement. Regional isolation makes it straightforward to apply location-specific policies without global code changes.
Across all regions, one property must remain constant: customer trust in the system.
Data accuracy and customer trust#
Trust is the invisible infrastructure of Amazon Locker. Every design decision ultimately serves a trust equation.
Customers trust that their package will be there when they arrive. Drivers trust that lockers will open when instructed. Amazon’s operations team trusts that capacity data reflects physical reality. When any of these expectations break, recovery is expensive and customer goodwill is difficult to rebuild.
This is why the system makes consistently conservative choices:
- Capacity undercommitment rather than overbooking. An unused slot costs less than a failed delivery.
- Pessimistic availability surfacing during checkout. Better to not show a locker than to show one that fails later.
- Proactive customer communication at every state transition. Customers receive notifications at reservation, drop-off, pre-expiration reminder, and expiration.
- Predictable behavior over optimized behavior. The system does the same thing every time, even if a slightly smarter approach might squeeze out 2% more utilization.
Real-world context: Amazon’s customer obsession principle directly manifests here. The locker system trades operational efficiency for customer reliability. Internal metrics likely weight “failed pickup rate” far more heavily than “compartment utilization rate.”
Trust is also why the state reconciliation, audit logging, and credential security discussed earlier are not optional features. They’re structural requirements that make the rest of the system credible.
Understanding how interviewers evaluate this design can help you focus your preparation on the signals that matter most.
How interviewers evaluate Amazon Locker System Design#
Amazon Locker is a strong interview question because it tests the intersection of software architecture and physical-world constraints. Interviewers are evaluating specific capabilities.
Constraint identification: Can you identify that this is a bounded-resource problem with time-based ownership, not just a CRUD application? Mentioning concepts like delivery speed tier partitioning and dwell time prediction demonstrates depth.
Trade-off articulation: The reservation accuracy vs. utilization trade-off is central. Strong candidates explicitly name this tension and explain why they’d choose conservative allocation. Weak candidates skip reservation entirely or treat it as a simple database write.
Failure reasoning: Interviewers probe edge cases. What happens if the locker is offline during drop-off? What if two drivers arrive simultaneously? What if the customer’s code was sent to a defunct email? Candidates who proactively surface and resolve these scenarios show production readiness.
Separation of concerns: Decomposing the system into distinct subsystems (discovery, reservation, access, expiration) with clean boundaries signals architectural maturity. Monolithic designs that mix order management with hardware control raise red flags.
Pro tip: Don’t try to design the entire system at once. Start with the package life cycle (checkout to reservation to drop-off to pickup to expiration) and layer in subsystems as you trace the flow. This narrative approach keeps your explanation organized and demonstrates end-to-end thinking.
Interviewers care less about whether you use PostgreSQL or DynamoDB and more about whether you understand why compartment state needs reconciliation, why pickup codes must work offline, and why the system should reject a delivery rather than risk a failed pickup.
Conclusion#
Amazon Locker System Design reveals that the hardest distributed systems problems aren’t always about scale. They’re about coordination between digital workflows and physical constraints, about managing time-bound resources conservatively, and about maintaining trust when hardware fails and networks drop. The three most critical takeaways are that capacity reservation must be probabilistic and delivery-speed-aware rather than naive and static, that every compartment follows a strict state machine with transitions driven by both software events and physical signals, and that offline resilience through local credential caching and MQTT-based communication is not optional but foundational to system reliability.
Looking ahead, the next evolution of locker systems will likely incorporate computer vision for package verification, dynamic pricing of locker slots based on demand, and tighter integration with autonomous delivery vehicles that can interact with locker hardware without human drivers. The underlying architecture, bounded physical resources managed through probabilistic digital models, will extend to drone landing pads, robotic delivery pods, and other physical-digital hybrid infrastructure.
If you can clearly trace how a package moves from checkout to a locker compartment to a customer’s hands, and explain what happens at every point where that journey might break, you’ve demonstrated exactly the kind of systems thinking that builds infrastructure people depend on.