Backend Development 13 min read

Full Volume Message Push Implementation Based on Public Mailbox at Baidu

Baidu’s full‑volume push system leverages a public‑mailbox architecture that merges a single shared mailbox with users’ private mailboxes during retrieval, enabling low‑disturbance, high‑speed delivery to over 600 million monthly active users while reducing write costs, as demonstrated by three pandemic‑policy messages reaching more than 200 million users within three days.

Baidu Tech Salon
Baidu Tech Salon
Baidu Tech Salon
Full Volume Message Push Implementation Based on Public Mailbox at Baidu

This article introduces Baidu's implementation of full volume message push notifications using a public mailbox mechanism. The background stems from Baidu App's need to reach all 600M+ monthly active users with low user disturbance, particularly for scenarios like pandemic policy dissemination.

The article first explains the existing IM system architecture, including user entities, accounts, relationships, chat sessions, and messages. It describes the notify-pull pattern where real-time notifications trigger message pulling from the server, and introduces the user mailbox system (private mailbox, group mailbox) for offline message storage.

Three implementation approaches are compared: (1) Push through notification entry to all users' private mailboxes; (2) Skip notification entry and write directly to mailboxes; (3) Public mailbox mechanism using read diffusion. The third approach stores messages in a single public mailbox and merges it with user private mailboxes during message retrieval, trading read cost (CPU) for write cost (storage).

The implementation includes: full message management workflow (O-end operations, access layer, logic layer, mailbox proxy, storage layer), user mailbox pulling with public mailbox memory caching (4.7Wqps peak), and a graded release mechanism with whitelist support.

Advantages include fast distribution speed and low resource cost. Limitations include unsuitability for high personalization scenarios and real-time notification scenarios due to system pressure concerns.

During Q4 2022 pandemic reopening, three full volume messages were successfully delivered to 200M+ users each within 3 days, demonstrating the system's effectiveness.

distributed systemsSystem Architecturemessage-pushInstant MessagingRead DiffusionBaidu Appnotification systempublic mailbox
Baidu Tech Salon
Written by

Baidu Tech Salon

Baidu Tech Salon, organized by Baidu's Technology Management Department, is a monthly offline event that shares cutting‑edge tech trends from Baidu and the industry, providing a free platform for mid‑to‑senior engineers to exchange ideas.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.