How Maoyan Boosted Microservice Performance by Migrating from Nacos to Polaris
Maoyan, a leading ticketing platform, migrated its Dubbo‑based microservice registry from Nacos to Tencent Cloud Polaris, achieving a 30% improvement in registration discovery speed, higher scalability, and stronger fault tolerance across millions of services.
Background
Maoyan Entertainment runs a high‑traffic microservice system based on Dubbo and Nacos. In flash‑sale scenarios the Nacos registry exhibited >10 s latency for instance registration, limited horizontal scaling, and capacity{nbsp}bottlenecks.
Problems with Nacos
Data freshness : CP+AP design caused >10 s delay for instance up/down events.
Scalability : Adding nodes increased consistency‑protocol overhead, leading to queue buildup and marginal throughput gains.
Capacity : Registration load grew non‑linearly with service count, threatening HA requirements.
Failure impact : When >50 % of Nacos nodes failed, partial functionality broke and debugging was difficult.
Migration Goals
Reduce registration data volume by using Dubbo 3.x application‑level registration.
Enable horizontal scaling to millions of nodes with stable CPU usage.
Improve fault tolerance and isolation.
Why Polaris?
Polaris (Tencent Cloud) is an open‑source service registry, configuration and governance platform designed for massive scale. It separates compute and storage, provides a stateless control plane, and supports data sharding and read‑only incremental caches.
Polaris Advantages
Stateless control plane + compute‑storage separation → parallel scaling to millions of nodes.
Data sharding for concurrent performance and storage growth.
Read‑only cache with incremental loading for real‑time updates.
Multi‑AZ/region disaster recovery and multi‑layer caching for high availability.
Migration Strategies Evaluated
Traffic‑gate gray switch : Deploy Polaris alongside Nacos and shift traffic via gateway.
Dual registration & discovery : Services register to both Nacos and Polaris, allowing instance‑level cut‑over.
Data synchronization : Mirror registrations between Nacos and Polaris.
The dual‑registration approach was selected for fine‑grained control and minimal impact.
Implementation Details
Keep the existing Nacos cluster unchanged; create an isolated Polaris cluster.
Enable dual registration in Dubbo SDK by configuring both Nacos and Polaris endpoints. Example configuration (Dubbo 3.x):
<dubbo:registry address="nacos://127.0.0.1:8848"/>
<dubbo:registry address="polaris://polaris.example.com:8090"/>During migration, traffic continues to use Nacos while new services are gradually registered to Polaris.
After functional validation, switch 100 % of traffic to Polaris and decommission Nacos.
Results
Service registration and discovery latency improved by ~30 %.
No cluster jitter observed during high‑load events; stability increased.
Scalability to millions of nodes with CPU <77 % at 4.8 × 10⁷ push events.
TP99 latency for service discovery remained <10 s across all benchmark scenarios.
Performance Benchmarks
Polaris was stress‑tested with up to 20 000 nodes. Push volumes ranged from 80 million to 48 million messages per second without hitting bottlenecks; change events reached 100 % of clients.
Benefits
Performance boost : Faster registration and quicker instance change notifications.
Stability gain : No cluster oscillations; successful HA drills.
Scalability improvement : Auto‑scaling and seamless expansion/shrinking of services.
Future Plans
Leverage Polaris for dynamic routing, load balancing, circuit breaking, and rate limiting to further enhance release safety and system reliability.
Tencent Cloud Middleware
Official account of Tencent Cloud Middleware. Focuses on microservices, messaging middleware and other cloud‑native technology trends, publishing product updates, case studies, and technical insights. Regularly hosts tech salons to share effective solutions.
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.
