How Service Mesh Revolutionized Cloud‑Native Architecture at FangDuoduo
This article explains what a Service Mesh is, how FangDuoduo adopted Envoy and macvlan/overlay networks to solve Dubbo IP registration issues, built an XDS configuration service for both containers and VMs, and dramatically improved development efficiency and infrastructure agility.
Service Mesh is an infrastructure layer that handles communication between services. In cloud‑native applications with complex topologies, it ensures reliable request traversal and is typically composed of lightweight network proxies deployed alongside applications, without requiring the applications to be aware of them.
Operating above TCP/IP, Service Mesh abstracts the routing of service‑to‑service requests much like TCP abstracts byte transmission, and it must also cope with network failures.
Service Mesh in FangDuoduo’s Context
By Q3 2018, FangDuoduo had containerized most services, using overlay networks for Node.js and macvlan for Java services. Dubbo services were placed on macvlan, but Dubbo’s poor container support caused random IP selection in multi‑NIC containers. The team used environment variables such as DUBBO_IP_TO_REGISTRY , DUBBO_PORT_TO_REGISTRY , DUBBO_IP_TO_BIND , and DUBBO_PORT_TO_BIND to specify registration IPs, a workaround that was not elegant.
Because some services expose both HTTP and Dubbo endpoints, a proxy for HTTP traffic became necessary, leading the team to consider a Service Mesh.
With over 400 app IDs and most traffic still routed through Nginx, the operations and business teams needed a more efficient solution for configuration management and communication overhead. Envoy, a mature and stable project, was chosen as the data‑plane proxy.
To support both overlay and macvlan networks, Envoy’s NICs were attached to each network respectively, turning Envoy into an internal gateway that handles intra‑service traffic.
Building the XDS Service for Data‑Plane Configuration
The XDS service supplies the data plane with cluster and routing configurations, as well as downgrade and rate‑limiting rules. Because many legacy services still run on VMs, the XDS service must be compatible with both containers and VMs.
Cluster data sources include internal DNS from containers and VM data from the release system.
Supports multiple virtual host (vhost) configurations.
Provides routing configuration.
Enables rate control and gateway error retries.
Boosting R&D Efficiency
Implementing the Service Mesh dramatically increased development efficiency at FangDuoduo, reducing time spent on configuration maintenance, lowering the risk of bugs, and streamlining the development process.
Key benefits include:
The proxy layer provides service discovery, allowing developers to build single‑instance applications and reducing framework development cost.
Downgrade and rate‑limiting are handled in the proxy layer with flexible, easily adjustable rules.
Infrastructure upgrades no longer depend on business services.
Conclusion and Future Plans
Thanks to a cloud‑native architecture, Service Mesh can leverage improvements in underlying infrastructure, directly empowering business capabilities—unlike traditional frameworks where infrastructure upgrades do not translate into service enhancements.
FangDuoduo’s Service Mesh is still in its early stage; future work includes blue‑green deployments, API‑gateway‑style versioned API releases, and configuration mirroring.
Fangduoduo Tech
Sharing Fangduoduo's product and tech insights, delivering value, and giving back to the open community.
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.