How 58.com Scales 40 Billion Daily Requests: Inside the Bangbang Architecture

This article details how 58.com’s Bangbang system evolved from a traditional IM platform to a massive, multi‑layered architecture handling over 40 billion daily requests, covering its four‑layer design, third‑party integration challenges, client lightweighting, and the push technologies that power its mobile O2O services.

21CTO
21CTO
21CTO
How 58.com Scales 40 Billion Daily Requests: Inside the Bangbang Architecture

58.com Bangbang Technical Architecture

System Origin: Traditional IM

Initially, Bangbang was a traditional instant messaging system used for user communication and information transfer. The architecture was designed with four layers: access, logic, routing, and data.

Access Layer directly handles massive PC, mobile, and web client connections, consolidates them into a few long connections, and forwards requests to the logic layer.

Logic Layer processes business logic such as permission verification, adding friends, and sending messages.

Routing Layer manages session‑related data (online status, login IP, etc.) that changes rapidly and stores it in memory.

Data Layer acts as a data middleware, abstracting differences between RDBMS and NoSQL to simplify key data storage.

System Evolution: Third‑Party Business Integration

As the business expanded, Bangbang evolved into a comprehensive merchant mobile management platform, integrating services like real‑estate and recruitment. Third‑party services are accessed via HTTP calls from the app, which speeds development but creates tight coupling and costly client upgrades when APIs change.

Because third‑party services do not rely on long connections, they can be called directly via HTTP, allowing rapid integration. However, any change in third‑party interfaces forces client updates, leading to compatibility issues and high upgrade costs.

System Maturity: Client Light‑Weighting

A Bangbang WebService layer was added to reduce client‑side coupling; even if third‑party services change, the client remains unaffected.

O2O Core Technology Analysis

For mobile O2O, long connections, mobile LBS, and push technologies are essential.

1. Push Methods

Push can be implemented via three approaches:

1.1 Client polling (pull) – simple architecture but poor real‑time performance; increasing frequency raises battery consumption.

1.2 SMS push – high real‑time performance and delivery rate but costly.

1.3 Server long‑connection (push) – mainstream solution offering good real‑time performance with low battery usage.

2. Platform‑Specific Implementations

iOS: Due to background restrictions, only Apple APNS can be used for push notifications.

Android: More options are available, including Google C2DM (now deprecated), XMPP‑based protocols, and various third‑party push services. However, C2DM servers are overseas and can be blocked, and many Android devices omit the service, making it unreliable in China.

Third‑party push products face challenges such as delivery rate, real‑time performance, and dependence on shared channels, which can affect reliability.

Author: Sun Xuan (58.com System Architect) Source: UPYun System Architecture Conference Presentation
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

push notificationsScalabilityBackend DevelopmentInstant Messagingmobile O2O
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

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.