Integrating Dubbo Applications with Alibaba Cloud Service Mesh (ASM): Best Practices and Transition Scenarios
This guide explains how to connect Dubbo microservices to Alibaba Cloud Service Mesh (ASM) to obtain mTLS, observability, and traffic management, covering prerequisites, step‑by‑step deployment, code examples, a registry‑based transition approach, and recommended best‑practice configurations.
Service mesh is a cloud‑native infrastructure that provides traffic management, observability, and security for applications; Dubbo is a high‑performance microservice framework.
By integrating Dubbo with Alibaba Cloud Service Mesh (ASM), applications gain mTLS, Prometheus metrics, logging, and seamless traffic control without code changes.
Prerequisites : an ACK cluster, an ASM instance, a namespace with sidecar injection enabled.
Step 1 – Prepare the service‑mesh environment : create the ASM instance, add the cluster, and create the dubbo-demo namespace.
Step 2 – Dubbo application requirements : recommend upgrading to Dubbo 3 and using the Triple protocol, which is HTTP‑based and fully observable by the mesh.
Step 3 – Deploy provider and consumer : apply the following Kubernetes manifests (example shown) to create Services and Deployments for the provider and consumer, including liveness/readiness probes and sidecar annotations.
kubectl apply -f- <After deployment, verify communication via kubectl logs and observe that the upstream_cluster field reflects the mesh‑managed service name, confirming successful interception.
Transition scenario – Using a registry : for applications that still rely on Nacos or Zookeeper, enable the “Support Spring Cloud Service” plugin in ASM to inject host headers, allowing the mesh to recognize traffic while the Dubbo services continue using the Triple protocol.
Plugin configuration example:
provider_port_number: '20881' # provider port
pod_cidrs:
- 10.0.0.0/16 # cluster pod CIDRFinally, the article recommends adopting the best‑practice approach (no registry, Triple protocol) for production, using the transition method only as an interim step.
Alibaba Cloud Infrastructure
For uninterrupted computing services
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.