An increasing number of microservices applications use multiple programming languages such as Python, Go, and Node.js. Enterprise Distributed Application Service (EDAS) allows you to deploy multi-language microservices applications by using a service mesh. EDAS provides service governance capabilities and the following features for microservices applications: application management, service discovery, tracing analysis, load balancing, and application monitoring. This topic provides an example on how to use images to deploy multi-language microservices applications in EDAS.
Prerequisites
EDAS and Container Service for Kubernetes (ACK) are activated for your Alibaba Cloud account. For more information, see the following topics:
- Activate EDAS
- Quick start for first-time users
- The RAM user that you use is authorized by the relevant Alibaba Cloud account to use the images in a repository of Container Registry Enterprise Edition to deploy applications. For more information, see Configure policies for RAM users to access Container Registry.
Background information
Applications have evolved from the original monolithic architecture to the current microservices architecture. The microservices architecture facilitates application development. However, the microservices architecture increases complexity in service deployment and O&M. Microservices can be developed in all programming languages. After you deploy a multi-language microservice, you can use the SDKs for different programming languages or service meshes to provide features for the microservice, such as tracing analysis, service discovery, and load balancing. In tracing analysis, service discovery, and load balancing, the SDKs for different programming languages are intrusive to applications, whereas service meshes are considered to be non-intrusive to applications. Therefore, EDAS uses service meshes to support multi-language microservices.
A service mesh is a dedicated infrastructure layer that implements service-to-service communication. A service mesh provides a stable and reliable method to deliver requests. If you use a service mesh, you do not need to be concerned about the complex topology of services that compose a modern, cloud-native application. In most cases, a service mesh is implemented as an array of lightweight network proxies that are deployed in combination with application code. This way, you do not need to be concerned about the status of the application.
Scenario
BookInfo is an application that displays the detailed information about a book. The application functions as a filter for an online bookstore. The application displays the description of a book, details such as the International Standard Book Number (ISBN) and the number of pages, and reviews on the book.
BookInfo is a heterogeneous application that consists of several microservices applications. These microservices applications are developed in different programming languages. These microservices applications form a classic service mesh, which consists of multiple services that are written in different programming languages. Among these services, the Reviews service has multiple versions.

The BookInfo application consists of the following four independent services:
- Productpage: a Python service that calls the Details and Reviews services to generate a page. The Productpage service provides the logon and logoff features.
- Details: a Ruby service that provides book information.
- Reviews: a Java service that provides book reviews and calls the Ratings service.
The Reviews service has the following three versions:
- Version 1, which does not call the Ratings service.
- Version 2, which calls the Ratings service and rates a book with one to five black stars.
- Version 3, which calls the Ratings service and rates a book with one to five red stars.
- Ratings: a Node.js service that provides ratings generated based on book reviews.
Procedure
Before you can deploy applications in a Kubernetes cluster, you must create a cluster in the ACK console and import the cluster to EDAS in the EDAS console. Then, you can use a custom image to deploy an application in the cluster.

Step 1: Create an ACK cluster
Log on to the ACK console and create an ACK cluster. For more information, see Create a managed Kubernetes cluster.
To create a serverless Kubernetes cluster, set the VPC parameter to Create VPC and set the Service Discovery parameter to PrivateZone. This allows the serverless Kubernetes cluster to use Alibaba Cloud Service Mesh after the cluster is imported to EDAS. If you set the VPC parameter to Select Existing VPC, check whether the cluster contains virtual private cloud (VPC) and vSwitch resources after you create the cluster.

Step 2: Import the ACK cluster to EDAS in the EDAS console
By default, the ack-ahas-sentinel-pilot, ack-arms-pilot, and ack-arms-prometheus components are installed when you import an ACK cluster to EDAS in the EDAS console. The ack-ahas-sentinel-pilot component is an application protection component for throttling and degradation. The ack-arms-pilot component is an Application Real-Time Monitoring Service (ARMS) monitoring component. The ack-arms-prometheus component is a Prometheus monitoring component.
Step 3: Enable the integration with Tracing Analysis
The Istio service mesh allows you to use Tracing Analysis to monitor multi-language applications in the EDAS console. The Istio proxy can automatically send span information. However, applications must carry HTTP headers so that the span information can be associated with an individual trace.
- x-request-id
- x-b3-traceid
- x-b3-spanid
- x-b3-parentspanid
- x-b3-sampled
- x-b3-flags
- x-ot-span-context
In this example, only the HTTP headers that are carried in the applications of specified services in the sample multi-language application are described.
def getForwardHeaders(request):
headers = {}
# x-b3-*** headers can be populated using the opentracing span
span = get_current_span()
carrier = {}
tracer.inject(
span_context=span.context,
format=Format.HTTP_HEADERS,
carrier=carrier)
headers.update(carrier)
# ...
incoming_headers = ['x-request-id']
# ...
for ihdr in incoming_headers:
val = request.headers.get(ihdr)
if val is not None:
headers[ihdr] = val
return headers
@GET
@Path("/reviews/{productId}")
public Response bookReviewsById(@PathParam("productId") int productId,
@HeaderParam("end-user") String user,
@HeaderParam("x-request-id") String xreq,
@HeaderParam("x-b3-traceid") String xtraceid,
@HeaderParam("x-b3-spanid") String xspanid,
@HeaderParam("x-b3-parentspanid") String xparentspanid,
@HeaderParam("x-b3-sampled") String xsampled,
@HeaderParam("x-b3-flags") String xflags,
@HeaderParam("x-ot-span-context") String xotspan) {
if (ratings_enabled) {
JsonObject ratingsResponse = getRatings(Integer.toString(productId), user, xreq, xtraceid, xspanid, xparentspanid, xsampled, xflags, xotspan);
Step 4: Deploy a multi-language application in the Kubernetes cluster
Verify the result
After the application is deployed, access the main service. The application page displays the description of a book, details such as the ISBN and the number of pages, and reviews on the book. You can also perform logon and logoff operations.
Implement application monitoring
After you deploy the sample application, you can collect key metrics to monitor the health status of the application. The metrics include general metrics, service metrics, and system information such as the CPU and memory usage. The general metrics include the total number of requests and the average response time. The service metrics are related to the services provided by the application and the services on which the application depends.
- Log on to the EDAS console.
- In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace. On the Applications page, click the name of the desired application.
- View the metrics that indicate the health status of the application.
- Check the system resource usage of the application.
FAQ
How do I view the error logs that track application changes?If you fail to use an image to deploy an application, you can view the error logs on the Change List page. For more information, see View application changes.
DingTalk group for microservice-oriented applications developed by using multiple programming languages in EDAS
If you have questions or suggestions when you deploy microservice-oriented applications
by using multiple programming languages in EDAS, submit a ticket. To give feedback, you can also join the DingTalk group by scanning the following
QR code or searching for the DingTalk group ID 23307994
.