PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Amazon

Design an intersection traffic-light system

Last updated: Mar 29, 2026

Quick Overview

This question evaluates system design competency across real-time control and safety-critical logic, API and data modeling, sensor/actuator integration, and operational scalability for traffic-signal controllers.

  • hard
  • Amazon
  • System Design
  • Software Engineer

Design an intersection traffic-light system

Company: Amazon

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design a traffic-light control system for a multi-road intersection. State explicit goals and assumptions (e.g., number of lanes, pedestrian/bike crossings, turn arrows, emergency vehicles, public transit priority, sensor availability). Define core components (controllers, sensors, actuators), data model, and APIs. Specify the state machine for signal phases, timing calculations (fixed-time vs. adaptive), coordination across approaches, and handling of peak/off-peak patterns. Explain strategies for safety (conflict avoidance, all-red intervals), concurrency, preemption/priority, failure detection and safe fallback modes, monitoring/observability, deployment, and scaling to a citywide network. Follow-ups: If given more time, what optimizations would you implement? How would you design comprehensive unit tests and simulations, including deterministic time control and edge cases?

Quick Answer: This question evaluates system design competency across real-time control and safety-critical logic, API and data modeling, sensor/actuator integration, and operational scalability for traffic-signal controllers.

Related Interview Questions

  • Design a Log Collection System - Amazon (medium)
  • Design Human Avoidance for Warehouse Robots - Amazon (medium)
  • Design a High-Availability Load Balancer - Amazon (hard)
  • Design a Ride-Hailing Matching System - Amazon (medium)
  • Design a cloud database write path and recovery - Amazon (hard)
Amazon logo
Amazon
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
14
0

System Design: Traffic-Light Control for a Multi-Road Intersection

Context

Design the software and systems for controlling a signalized, multi-approach intersection. Assume you are building the on-controller logic, the local APIs, and the central management interfaces used to deploy and monitor a network of intersections.

Requirements

  1. State explicit goals and assumptions:
    • Examples to address: number of approaches and lanes, protected/permissive turn arrows, pedestrian and bike crossings, emergency vehicles, public transit priority, railroad preemption (if any), and sensor availability/types.
  2. Define core components:
    • Controllers, sensors, actuators, communications.
    • Data model and key APIs (configuration, control, telemetry).
  3. Specify the control logic:
    • State machine for signal phases and pedestrian intervals.
    • Timing calculations: fixed-time vs. actuated/adaptive.
    • Coordination across approaches and between intersections (peak/off-peak plans, offsets).
  4. Safety and reliability:
    • Conflict avoidance, intergreen (yellow/all-red) intervals, concurrency rules.
    • Preemption/priority (emergency, transit), failure detection, and safe fallback modes.
  5. Operations:
    • Monitoring/observability, deployment strategy, and scaling to a citywide network.
  6. Follow-ups:
    • With more time, what optimizations would you implement?
    • How would you design comprehensive unit tests and simulations, including deterministic time control and edge cases?

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.