This challenge builds on Chat App 1 - Team Messaging. Complete it first for the best experience.
ThreadSpace has grown to 50 million users and is adding enterprise-grade security:
- End-to-end encryption (E2EE) - messages are encrypted on the sender's device and decrypted only on recipient devices. The server never sees plaintext. Key management across multiple devices per user is critical.•Cross-organization messaging - users in different organizations can be invited to shared channels (federation). This introduces trust boundaries and key exchange challenges.•Multi-region deployment - the service runs in 5 regions. Users should connect to the nearest region. Messages between users in the same org (likely same region) should be fast; cross-region messages can tolerate slightly higher latency.•Compliance - message audit logs for regulated industries (the encrypted content is opaque to the server, but metadata - who messaged whom, when - must be retained for 5 years).
This challenge tests your understanding of security architecture, key management, and the trade-offs of E2EE at scale.
Add E2E encryption, cross-org messaging, and scale to 50 M users across regions. Build this architecture under realistic production constraints, then validate tradeoffs in the design lab simulation.
Request path: The solution keeps ingress, service logic, and stateful dependencies separated so each layer can scale independently.
Reference flow: Mobile Clients -> DNS -> Load Balancer -> API Gateway -> Core Service -> Auth Service -> Primary NoSQL DB -> Replica SQL DB