Traffic Camera Messaging: Format Priorities, Large Payloads and Lost Messages

Quick Overview

A traffic camera messaging system raises three decisions: how to order format, versioning, error handling and monitoring work; how to move large messages by chunking, streaming, metadata separation or off-peak transfer; and how DLQs, retries, retention and TTL address message loss. Tests reliability trade-offs.

Traffic Camera Messaging: Format Priorities, Large Payloads and Lost Messages

Company: Amazon

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Online Assessment

A city runs a messaging system that carries messages from its traffic cameras to back-end services. In a work-simulation format, you are given three situations from this system and asked to evaluate a set of options for each. Discuss each situation as you would with your team: which options you would choose, in what order, and why. ### Clarifying Questions - What do the cameras send: small event records, still images, video clips, continuous video, or a mix? How large are the largest messages? - Which consumers depend on these messages, and how fresh must the data be for each of them? - Can camera firmware be updated, and how quickly? Will cameras on old and new message versions send at the same time? - What connectivity do the cameras have, and can they buffer messages locally while the network is down? - Which message broker is in use today, and what message size limit does it enforce? ### Part 1: Prioritizing message format work The team must define how camera messages are formatted. Four work items compete for attention: a message format standard, version management, error handling, and monitoring. How would you prioritize them, and what does each involve? ```hint Field devices outlive schemas Consider which of these items is hardest to add once cameras across the city are already sending messages. ``` #### What This Part Should Cover - A justified order, with the dependencies between the items - What the standard defines: required fields, identifiers, timestamps, encoding - How message versions coexist and evolve compatibly - What happens to invalid messages, and what gets measured ### Part 2: Transmitting large messages Some camera messages are too large for the current path. Evaluate four approaches: splitting messages into chunks, streaming, separating metadata from the payload, and transmitting during off-peak hours. When does each fit, and what would you recommend? ```hint Not every large message is urgent Separate what downstream consumers need immediately from what they could fetch or receive later. ``` #### What This Part Should Cover - The mechanics and failure modes of each option - Matching each option to message types and latency needs - How the completeness and integrity of a payload are verified - A recommendation and its costs ### Part 3: Message loss in the queue The system is losing messages. Evaluate dead-letter queues, retries, retention settings and time-to-live (TTL) settings as remedies. Which of them would actually stop the loss, and what would you check first? ```hint Find where messages disappear Each option addresses a different cause. First work out whether messages are lost before the broker, inside it, or after a consumer reads them. ``` #### What This Part Should Cover - Locating the loss with end-to-end measurement before changing settings - What each of the four options does and which cause of loss it addresses - Which of these settings can themselves cause loss - Producer and consumer acknowledgment behavior, and handling of duplicates ### What a Strong Answer Covers - Decisions tied to the traffic-camera context: devices in the field, mixed message sizes, real-time and archival consumers - Clear trade-offs for each option instead of adopting all of them - Reliability reasoning: at-least-once delivery, idempotent processing, ordering per camera - Observability that would reveal each situation's problem early ### Follow-up Questions - A new message version adds a required field, but some older cameras cannot be updated. How do consumers handle both versions? - A camera loses connectivity for several hours and then reconnects with a backlog. How should it send the backlog without delaying live messages? - After you add retries, downstream event counts go up. What happened, and how do you fix it? - How would you alert on message loss before a consumer team reports missing data?

Overview: A traffic camera messaging system raises three decisions: how to order format, versioning, error handling and monitoring work; how to move large messages by chunking, streaming, metadata separation or off-peak transfer; and how DLQs, retries, retention and TTL address message loss. Tests reliability trade-offs.

Read the full Amazon Software Engineer interview experience this question came from

Amazon logo
Amazon
Nov 13, 2026
mediumSoftware EngineerOnline AssessmentSystem Design
3
0

A city runs a messaging system that carries messages from its traffic cameras to back-end services. In a work-simulation format, you are given three situations from this system and asked to evaluate a set of options for each. Discuss each situation as you would with your team: which options you would choose, in what order, and why.

Clarifying Questions Guidance

  • What do the cameras send: small event records, still images, video clips, continuous video, or a mix? How large are the largest messages?
  • Which consumers depend on these messages, and how fresh must the data be for each of them?
  • Can camera firmware be updated, and how quickly? Will cameras on old and new message versions send at the same time?
  • What connectivity do the cameras have, and can they buffer messages locally while the network is down?
  • Which message broker is in use today, and what message size limit does it enforce?

Part 1: Prioritizing message format work

The team must define how camera messages are formatted. Four work items compete for attention: a message format standard, version management, error handling, and monitoring. How would you prioritize them, and what does each involve?

What This Part Should Cover Guidance

  • A justified order, with the dependencies between the items
  • What the standard defines: required fields, identifiers, timestamps, encoding
  • How message versions coexist and evolve compatibly
  • What happens to invalid messages, and what gets measured

Part 2: Transmitting large messages

Some camera messages are too large for the current path. Evaluate four approaches: splitting messages into chunks, streaming, separating metadata from the payload, and transmitting during off-peak hours. When does each fit, and what would you recommend?

What This Part Should Cover Guidance

  • The mechanics and failure modes of each option
  • Matching each option to message types and latency needs
  • How the completeness and integrity of a payload are verified
  • A recommendation and its costs

Part 3: Message loss in the queue

The system is losing messages. Evaluate dead-letter queues, retries, retention settings and time-to-live (TTL) settings as remedies. Which of them would actually stop the loss, and what would you check first?

What This Part Should Cover Guidance

  • Locating the loss with end-to-end measurement before changing settings
  • What each of the four options does and which cause of loss it addresses
  • Which of these settings can themselves cause loss
  • Producer and consumer acknowledgment behavior, and handling of duplicates

What a Strong Answer Covers Guidance

  • Decisions tied to the traffic-camera context: devices in the field, mixed message sizes, real-time and archival consumers
  • Clear trade-offs for each option instead of adopting all of them
  • Reliability reasoning: at-least-once delivery, idempotent processing, ordering per camera
  • Observability that would reveal each situation's problem early

Follow-up Questions Guidance

  • A new message version adds a required field, but some older cameras cannot be updated. How do consumers handle both versions?
  • A camera loses connectivity for several hours and then reconnects with a backlog. How should it send the backlog without delaying live messages?
  • After you add retries, downstream event counts go up. What happened, and how do you fix it?
  • How would you alert on message loss before a consumer team reports missing data?