Skip to content
System Designer

Medium · Telecom and messaging

Voice and video call setup

People tap a name and expect the other phone to ring in a second or two. Your job is the setup: find where the person is, ring their devices and connect the two sides. Everyone calls at the same moments, like evenings and holidays. Practise this medium system design problem for free with a Google or GitHub account.

The brief

People tap a name and expect the other phone to ring in a second or two. Your job is the setup: find where the person is, ring their devices and connect the two sides. Everyone calls at the same moments, like evenings and holidays.

Think of the ringing part of a calling app or phone carrier.

Users, scale and requirements

Who uses it
40 million people a month (approx.)
Audience in plain numbers
40,000,000 people per month
Normal peak
≈ 15,000 requests per second
Request mix
Message: 70%; Analytics event: 10%; Read: 10%; Sign-in: 10%
Speed for 99 of 100 requests
Message: ≈ 300 ms; Read: ≈ 400 ms; Sign-in: ≈ 1,000 ms
Successful requests
99.95%
Data safety
At most 1 minute of writes may be lost.
Monthly budget
≈ $29,000
Data at rest
≈ 3 TB
Where users are
North America: 40%; Europe: 35%; Asia Pacific: 25%
Home region
North America
Waiting deadlines
Message: 900 seconds; Analytics event: 3,600 seconds; Read: 900 seconds; Sign-in: 900 seconds

≈ marks an approximation, just as in the game. Waiting deadlines measure the age of queued work and are separate from interactive response time.

  • Setting up one call takes about 8 small messages (approx.).
  • About 1,900 calls begin each second at the evening peak (approx.).
  • All numbers are rough approximations.

Questions that shape the design

Do you carry the voice itself?

No. Voice and video flow between the phones or a media service. You only set the call up and tear it down.

How fast must a call ring?

About 2 seconds from the tap. Longer feels broken.

What if a data centre fails?

Calls already in progress should continue. New calls must find another route quickly.

The traffic day

Lunch and evening meal peaks. The clock covers 00:00 to 24:00 in the home region. Events add pressure on top of that normal traffic.

  1. 19:00 · Flash crowd

    A scheduled launch brings a sudden rush of requests.

    Traffic reaches 2.5 times the scheduled load; rises over 30 seconds, holds for 900 seconds and eases over 1,800 seconds.

  2. 21:00 · Zone outage

    An availability zone loses power or network access.

    Duration: ≈ 3,600 seconds.

What a strong design has to handle

  • To ring someone you must know which server holds their open connection. Where can that be kept?
  • Recover call setup across multiple devices without duplicate accepted calls.
  • Keeping presence in a fast store makes ringing quick, but it may briefly say a person is online after they left.
  • Running in several regions keeps calls quick for everyone, at the price of more machines and a harder failover plan.

Make a prediction, run a full traffic day, then compare the result. The in-game editorial opens after a finished day and includes measured reference designs.

Concepts to practise

Related problems