How 58.com Scales 40 Billion Daily Requests: Inside Its IM and Mobile Architecture
This article examines 58.com’s BangBang system architecture, detailing its four‑layer backend design, evolution from a traditional IM to a mobile management platform, and the push technologies used to support massive O2O traffic and millions of concurrent users.
58.com "BangBang" Technical Architecture
58 Tongcheng is a classified information platform covering real‑estate, used‑car, recruitment, and more. Its BangBang system processes over 40 billion daily requests and supports more than 1 million concurrent users, presenting serious infrastructure challenges.
System Origin: Traditional IM
Initially a traditional instant‑messaging service for user communication. The architecture is divided into four layers: access, logic, routing, and data.
1. Access Layer : Handles massive client connections from PC, mobile, and web, aggregates them into a few long connections, and forwards requests to the logic layer.
2. Logic Layer : Processes business logic such as permission checks, adding friends, and sending messages.
3. Routing Layer : Stores session‑related data (online status, login IP, etc.) in memory because the data changes rapidly.
4. Data Layer : Acts as a middleware that abstracts differences between RDBMS and NoSQL, simplifying key data storage.
System Evolution: Third‑Party Business Integration
As business needs grew, BangBang transformed into a comprehensive mobile management platform, integrating services like real‑estate and recruitment. Third‑party functionalities are accessed via HTTP from the app, reducing reliance on long connections but creating tight client‑service coupling, which leads to costly client updates when services change.
System Maturity: Lightweight Client
To decouple clients from third‑party changes, a BangBang WebService layer was added, allowing client apps to remain stable even when services evolve.
O2O Core Technologies
Mobile O2O relies heavily on long connections, location‑based services, and push technology.
Push Methods
1. Client polling (pull) : Simple architecture but suffers from poor real‑time performance and high battery consumption when frequency increases.
2. SMS push : Offers high delivery rates and good real‑time performance but is expensive.
3. Server long‑connection push : The mainstream solution providing real‑time delivery with low battery impact.
Platform‑Specific Implementations
iOS : Apps cannot run background services, so push must use Apple’s APNS channel. The typical flow is illustrated below.
Android : Multiple options exist, including Google C2DM, open‑source XMPP, or third‑party push services. C2DM suffers from server accessibility issues and fragmentation in China.
Open‑source protocols like XMPP lack ACK mechanisms and can become unstable under high request volumes. Third‑party push products may claim high delivery rates, but real‑world performance varies, and shared channels can affect real‑time reliability.
Conclusion
Developing an in‑house push solution would require solving massive server‑side long‑connection management and ensuring client service stability across diverse device constraints. Therefore, BangBang primarily adopts a hybrid approach, integrating multiple third‑party push providers and using data analysis to select the optimal service per device, thereby improving delivery rates and overall reliability.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
