Chapter 7: Presence and Push Architecture – Keeping Users in the Loop
In the pulse of real-time messaging, presence signals who's online or offline, while push notifications prod the disconnected back into conversation. These features are the heartbeat of engagement—scalable enough to handle millions of users and their devices, yet precise enough to feel instantaneous. In this chapter, we architect presence tracking with ephemeral keys that expire gracefully, heartbeat mechanisms that keep states fresh, and push notifications that bridge offline gaps. We'll integrate with APNs for iOS and FCM for Android, ensuring notifications arrive reliably without overwhelming users with duplicates. Designed for massive throughput, presence and push ensure users feel perpetually "in the loop."
2. Design Goals
The presence and push architecture is engineered to support over 100 million daily active users and millions of concurrent WebSockets, processing millions of heartbeats per second while ensuring accurate online/offline transitions, consistent multi-device presence, low-latency lookups for fanout decisions, reliable push notifications for offline or backgrounded devices, and resilience against crashes, network losses, and TTL expirations.
Presence and push must support:
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson