Backend Development 18 min read

High‑Availability Design and Optimizations of Didi’s Passport Authentication Service

This article details Didi’s Passport authentication system architecture, describing how language migration, service decomposition, flexible ticket and SMS code designs, multi‑region active‑active deployment, an independent Argus access‑control layer, and interface splitting together achieve high availability and low latency under extreme traffic peaks.

High Availability Architecture
High Availability Architecture
High Availability Architecture
High‑Availability Design and Optimizations of Didi’s Passport Authentication Service

In response to extreme traffic peaks and the need for high availability, Didi’s technical team presented the design and optimization practices of the Passport authentication service, which handles login and authorization for millions of concurrent requests across passenger, driver, and other client types.

Business Scenario : Passport serves as a central login and ticket‑issuing component within Didi’s platform, supporting services such as payment, account, and messaging. Each request carries a ticket that must be validated quickly and reliably.

Language Migration : The service was originally written in PHP; rewriting it in Go reduced the required instance count from 45 PHP processes to just 6 Go instances, dramatically improving resource utilization and response time.

Minimal Closed Loop (Small‑System‑Big‑Impact) : By extracting only the essential three‑tuple (phone number, password, UID) into a dedicated Passport service, the team avoided the bottlenecks of a monolithic user‑profile system and ensured that the login function remains always available.

Flexible Degradation – Ticket Design : The original ticket was a stateless opaque string, causing latency and failure issues when the ticket‑validation service was unavailable. The new design embeds encrypted semantic data (phone, UID, password) and a sequential seq number, allowing fast validation and graceful degradation when cache or validation services fail.

Flexible Degradation – SMS Code : To avoid reliance on cache for short‑lived verification codes, the team devised a deterministic algorithm that combines the phone number with a timestamp to generate a code, enabling verification even when the cache layer is down, at the cost of a slight security trade‑off.

Active‑Active Multi‑Region Deployment : Didi operates three IDC sites, each hosting different business lines. By assigning a sequential seq to tickets and allowing cross‑IDC validation with tolerant ordering, the system maintains login availability even when one data center experiences failures.

Independent Access‑Control Layer – Argus : To protect shared platform services from overload caused by aggressive testing or traffic spikes, Argus provides rate‑limiting, whitelist, and security policies, distributing quota checks across multiple nodes to keep the system stable.

Interface Splitting : Core login APIs, which change rarely, were isolated from frequently updated business logic, reducing the blast radius of deployments and keeping the most critical paths highly available.

After these optimizations, the Go‑based service handles peak QPS exceeding 10,000 with sub‑5 ms latency for most high‑concurrency endpoints and around 200 ms for password‑related operations due to cryptographic overhead.

Summary : Didi’s Passport redesign demonstrates how language migration, service decomposition, semantic tickets, deterministic SMS codes, multi‑region active‑active architecture, a dedicated overload‑protection layer, and careful API splitting collectively achieve resilient, low‑latency authentication under extreme load.

distributed systemsGolanghigh-availabilityLoad balancingAuthenticationsoft-failureticket
High Availability Architecture
Written by

High Availability Architecture

Official account for High Availability Architecture.

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.