Design a Chat-as-a-Service Platform That Developers Embed in Their Own Apps
Company: Microsoft
Role: Product Manager
Category: System Design
Difficulty: medium
Interview Round: Other
You are the product manager for a hosted web service that other developers call to put online chat into their own applications. The developers integrate with your service, and their users send and receive messages through it. How would you design this service? Explain what it offers developers, how it works technically at the depth a technical PM should be able to defend, and the key decisions and trade-offs you would make.
```hint Two layers of users
Your customer is the developer, but the people who notice a late, missing or out-of-order message are that developer's end users. Work out what each layer needs from the service before you draw any components.
```
### Clarifying Questions
- Are the developers external customers who sign up and pay, or internal product teams in the same company who will share one service?
- What kind of chat must they be able to build: user-to-user messaging (one-to-one and group), website visitor-to-support-agent chat, or both?
- Which clients matter at launch: browser only, or mobile apps too? Do developers expect a ready-made chat widget, or only APIs and SDKs?
- How much traffic and which regions should the first version handle, and do customers have to meet data-residency or message-retention rules?
### What a Strong Answer Covers
- Treating developers as the customer: a clear API and SDK surface (user tokens, conversations, messages, real-time events, webhooks) and an onboarding path that gets to a first working message quickly.
- A credible real-time architecture: persistent client connections, a message store partitioned by conversation, fan-out to online recipients and push notifications to offline ones, and media kept out of the message path.
- Delivery guarantees stated explicitly: durability once acknowledged, ordering within a conversation, deduplication of retried sends, and catch-up after a reconnect.
- Multi-tenant concerns: tenant isolation, per-tenant rate limits and quotas, key security, privacy and data-residency options.
- Success metrics for both developers and their end users, plus an MVP scope and a phased roadmap.
### Follow-up Questions
- One customer launches a live-event feature that puts 50,000 people in a single group conversation. What breaks first in your design, and what would you change?
- Several large customers ask for end-to-end encryption. Which platform features stop working, and how would you decide whether to offer it?
- What unit would you price the service on, and how would that choice change how developers use it?
Overview: A product manager system design question about building a hosted chat service that outside developers use to add real-time messaging to their own apps. It tests API and SDK design, real-time delivery, message storage, delivery guarantees, multi-tenant isolation and how to measure developer success.