IPv6 Migration Architecture and Implementation for Xianyu Mobile App
Xianyu’s IPv6 migration, driven by China’s carrier upgrades, implements a dual‑stack architecture that uses NAT at the LVS layer to translate IPv6 to IPv4 while embedding the client’s IPv6 address in HTTP headers, enabling gradual gray‑release, comprehensive testing, and monitoring, resulting in about 55 % IPv6 daily active users.
IPv6, the next‑generation IP protocol, was standardized in 1995 (RFC1883) to solve IPv4 address exhaustion and improve forwarding efficiency and security. After years of slow adoption, large‑scale deployment began only recently, especially in China where, since May 2018, the three major carriers upgraded their mobile networks to IPv6.
Xianyu, Alibaba’s largest second‑hand trading community, initiated an IPv6 migration to comply with national policy and prepare for future technology shifts.
IPv6 Application Architecture
The app’s network flow is:
DNS resolves domain names.
Static resources (images, JS) are fetched from CDN.
Business APIs are called via HTTPS to an LVS load balancer, then to an aserver (similar to Nginx), and finally to backend services through the mtop RPC layer.
IPv6 Solution
Based on Alibaba’s group‑wide IPv6 architecture, the migration uses NAT at the LVS layer to translate IPv6 to IPv4, while embedding the client’s IPv6 address in an HTTP header for downstream services. This minimizes backend changes; future full‑stack dual‑stack support is planned.
Renovation Principles
Testable, gray‑releaseable, monitorable, and rollback‑able.
Support IPv4/IPv6 dual‑stack to avoid user impact.
Gradual rollout: small modules → full business, branch services → core services.
Android first, then iOS.
Prioritize mobile traffic; PC traffic is low.
Migration Steps
Identify modification points in app and backend.
Upgrade app SDK and backend to IPv6‑compatible versions.
Internal gray testing of IPv6‑enabled app.
Public gray release and gradual traffic scaling via amdc for service and CDN domains.
Specific Changes
Upgrade network SDK to IPv6‑compatible version.
Front‑end IP handling logic to accept IPv6 format.
Backend services and databases to store IPv6 addresses.
LBS services to use IPv6 address libraries.
User profiling, search, and recommendation modules to support IPv6.
Testing Methods
Ensure local device is on a dual‑stack network (e.g., Wi‑Fi).
Use dedicated IPv6 testing tools (e.g., www.dotouch.net.cn).
Web‑based IPv6 access tests.
Log inspection for IP information.
Release Strategy & Monitoring
Gray release includes separate app rollout, front‑end/backend deployment, and domain scaling. Monitoring covers IPv6 CDN quality, traffic share, request latency, error rates, and IPv6 DAU/MAU metrics.
Since the IPv6 rollout at the end of last year, Xianyu’s IPv6 daily active users have reached ~55%, with stable operation and plans to expand IPv6 capability across more domains.
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.
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.
