Backend Development 9 min read

Migrating Idlecenter: Code and Traffic Migration Strategies for Large-Scale Backend Services

The migration of Xianyu’s legacy Idlecenter service split into code migration—defining clear RPC‑service boundaries, moving middleware together, and avoiding refactoring—and traffic migration using HSF routing to shift load transparently, enabling gray releases, observability, sub‑second rollbacks, cutting effort to one person‑week per service with zero faults and a reusable checklist.

Xianyu Technology
Xianyu Technology
Xianyu Technology
Migrating Idlecenter: Code and Traffic Migration Strategies for Large-Scale Backend Services

Idlecenter is a legacy backend service of Xianyu that has been in production since 2013. Over the years the monolith grew in size and complexity, leading to unclear business boundaries, deep code coupling, frequent branch conflicts, and stability risks.

The migration was split into two parts: code migration during the development phase and traffic migration during the operation phase.

Code migration principles include defining clear migration boundaries (scope and granularity), keeping the migration at RPC‑service granularity, avoiding any code refactoring or feature additions, and migrating related middleware and platform configurations together with the code.

Traffic migration leverages the internal HSF (High‑Speed Service Framework) routing capabilities. By injecting routing rules, traffic can be shifted gradually from the old service to the new one without modifying consumer code. The solution provides zero‑code‑change for consumers, transparent migration, and supports gray release, observability, and fast rollback.

Stability is ensured through three pillars: gray release (verifying traffic split and latency impact), observability (monitoring business metrics, resource usage, and regression testing via the Phoenix platform), and rollback (sub‑second rule reversal). POC tests confirmed gray‑release and rollback capabilities, RT impact < 3 ms, and even traffic distribution.

Overall, the migration reduced the effort to one person‑week per service, achieved zero‑fault migration, and provided a reusable checklist for future migrations.

Microservicestraffic routingHSFBackend Migrationservice stability
Xianyu Technology
Written by

Xianyu Technology

Official account of the Xianyu technology team

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.