LinkedIn Professional Network  ·  View 18 of 30  ·  5 · Runtime

Message Delivery — Ordered, Online and Offline

Durable before acknowledged, ordered by one sequencer, delivered over SSE or by push.

Editable source SVG draw.io All views
Sender API layer Messaging Conversation store Kafka Delivery front-end Recipient APNs / FCM 1. POST messages + client id 2. send 3. participant? blocked? 4. append, seq = last + 1 5. seq N 6. 201 · seq N 7. sent 8. MessageSent 9. for online recipients 10. SSE event ≤ 500 ms 11. delivered · read 12. receipt event 13. offline: push instead 14. notification Message Delivery — Ordered, Online and Offline Order is the sequence number from one writer per conversation; delivery may reorder, the client re-sorts. v 1.0 · owner Messaging Engineering · date 2026-09

Decisions

  • One writer per conversation assigns the sequence number, so order is total within a conversation without a global clock
  • The sender is acknowledged after the durable append and before delivery. Delivery is at-least-once, and the client dedupes by client message id
  • Delivery front-ends hold SSE connections on Play and Akka. LinkedIn chose SSE over WebSocket because it is plain HTTP through every proxy (LinkedIn, 2016)

Numbers

  • Delivery p95 under 500 ms to online recipients
  • Hundreds of thousands of persistent connections per delivery host (LinkedIn, 2016)
  • Presence comes from heartbeats on the same connections (LinkedIn, 2018)

Risks

  • A large group conversation fans out on delivery; capping group size keeps that bounded
  • InMail is metered, so credits live in MySQL, never in the message store