Design the Presence Service Behind Microsoft Teams Status

Last updated: November 29, 2026

Quick Overview

Design the system that tracks whether each Teams user is Available, Busy, In a meeting, Away, or Offline across all their devices, and pushes status changes to everyone who is looking at that user within a second or two.

Microsoft
System Design
Software Engineer
Microsoft
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design the system that tracks whether each Teams user is Available, Busy, In a meeting, Away, or Offline across all their devices, and pushes status changes to everyone who is looking at that user within a second or two.

Presence is one of the highest fan-out services in Microsoft 365: hundreds of millions of users, several devices each, and every chat list, org chart card, and Outlook contact shows a colored dot. Interviewers look for how you aggregate per-device signals, avoid pushing updates nobody is watching, and degrade gracefully when the service is overloaded.

What the Interviewer Expects
  • Separates presence ingestion (heartbeats, calendar, call state) from fan-out to watchers
  • Defines aggregation rules across devices and precedence of signals
  • Uses subscriptions so updates go only to active viewers
  • Partitions state by user and keeps it in memory with TTLs
  • Handles stale presence when clients vanish without logging out
  • Discusses rate limiting and coalescing of rapid flips
Key Topics to Cover
Pub/sub fan-out
Heartbeats and TTL
Sharded in-memory state
Aggregation rules
Backpressure
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • A CEO with 200,000 people viewing their card changes status: how do you avoid a fan-out storm?
  • How do you merge Outlook calendar state with live call state when they disagree?
  • How would you support cross-tenant (federated) presence with different privacy rules?
  • What metrics tell you presence is wrong, given users rarely report it?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: each device reports activity; the service computes one aggregate status per user; clients subscribe to the users visible on screen and receive changes; users can set a manual status with a...

High-Level Design

Clients keep a persistent connection to a regional edge gateway (WebSocket). Devices send heartbeats every 30 to 60 seconds plus explicit events (idle, locked, joined call). Gateways forward to a **Pr...


Submit Your Answer
Markdown supported