Evolution and Implementation of Service Mesh Architecture at Youzan
Since 2017, Youzan transformed its monolithic Nginx‑PHP stack into a language‑agnostic service mesh by introducing Dubbo, the ZanPHP RPC framework, a custom NOVA protocol, and the Go‑based Tether sidecar that offloads discovery, load‑balancing and monitoring, later adding a Service Pretender for cross‑region traffic, and now migrates discovery to Istio Pilot on Kubernetes for seamless, containerized microservice orchestration.
Since its introduction in early 2017, the concept of Service Mesh has attracted wide attention in the industry as the next‑generation architecture for microservices, spawning projects such as Istio that target cloud‑native environments.
Youzan initially operated a monolithic system built on Nginx + PHP‑FPM, which worked well for a small team but suffered from high coupling, poor isolation, and difficult collaboration as the business grew.
To enable a microservice transition, Youzan adopted Dubbo as the Java RPC framework and created ZanPHP, an asynchronous RPC framework for PHP, using ETCD for service registration and discovery. A custom cross‑language protocol called NOVA was built on top of Facebook’s Thrift to support Java‑PHP RPC calls.
The first version of the Tether component (Tether 0.1) was released in early 2016 as a sidecar proxy written in Go. It parses NOVA requests, caches ETCD service‑discovery data, and forwards RPC calls through persistent connections, effectively acting as a local agent for the consumer side.
Tether offloads the complexity of service discovery, load balancing, graceful shutdown, and monitoring from the PHP‑FPM applications, turning the sidecar into a transparent layer that hides the underlying Service Mesh functionality.
Later, Youzan migrated its core backend to Java (Dubbo) and moved page rendering to Node.js, which raised new cross‑language integration challenges. The team evaluated IDL‑based approaches (gRPC, Thrift) versus direct protocol handling and decided to expose a simple HTTP + JSON interface for Node.js to communicate with Tether, allowing generic calls without requiring developers to understand Dubbo internals.
To support cross‑data‑center calls, Youzan introduced the Service Pretender (SP) component that works together with Tether. SP provides HTTPS endpoints for remote service metadata, maintains heartbeat with Tether, and registers the remote service in the local ETCD, while TLS ensures encryption and authentication between data centers.
In production, Tether now handles more than 20 % of Youzan’s microservice traffic, integrates with the monitoring platform, and serves as both consumer‑side sidecar and gateway for inter‑region traffic.
Looking forward, Youzan Cloud adopts Kubernetes and Istio Pilot for service orchestration. Service discovery is being migrated from ETCD to Pilot’s ADS API, and the sidecar architecture will continue to evolve, enabling seamless language‑agnostic RPC, containerized deployments, and incremental feature upgrades without developer intervention.
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.
Youzan Coder
Official Youzan tech channel, delivering technical insights and occasional daily updates from the Youzan tech team.
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.
