Community Blog EDAS: The Powerful Combination of Kubernetes and Microservice Governance

EDAS: The Powerful Combination of Kubernetes and Microservice Governance

In this blog, we'll show you how you can tackle the challenges of Kubernetes and microservice management using Alibaba Cloud Enterprise Distributed Application Service (EDAS).

By EDAS Team

Cloud-native technologies have profoundly changed the process of software development and delivery. Bringing the focus of software development back to business has long been the common desire of developers, and the emergence of cloud native provides exactly perfect tools to help developers separate business functions of software from operation and maintenance (O&M) governance. As the core of scheduling and orchestration in cloud-native technologies, Kubernetes provides implementation standards for O&M governance and has proven to be effective in improving stability of complex systems and reducing O&M costs. Kubernetes has attracted more and more attention from developers as it gradually becomes mature.

In this blog, we'll show you how Alibaba Cloud Enterprise Distributed Application Service (EDAS) help you tackle these challenges in an innovative, cloud native manner.

Challenges of Cloud Native

Cloud native is advancing rapidly. However, it is not easy to make good use of it. When developers start to use cloud native or migrate to cloud-native architectures, they often encounter the following difficulties.

First, cloud native has constraints on software products, such as requirements for containerization and the 12 elements. Therefore, you need to make some changes to adapt a legacy system to the cloud-native system, and these changes sometimes even involve transformation of a development mode. For some teams, the transformation process can be challenging.

Second, Kubernetes is complex enough to deter many developers. You have to master it to give full play to the advantages of cloud native. Otherwise, you may find it difficult to maintain the system, and you may even encounter failures caused by configuration errors. Developers who want to keep pace with the technical development of Kubernetes have to continuously invest their time and energy in it, and these additional investments deviate from our initial intention to allow developers to focus only on business.

Third, although the open-source community has provided a variety of capability components for cloud native, you have to consider many factors, such as whether the performance, reliability, and maintainability of these open-source components can stand the test, and whether the O&M team is capable of independently handling these open-source components, before you select technologies for online services, especially for enterprise-level services.

In short, understanding cloud native and Kubernetes is only the beginning. In order to implement cloud native in business and put cloud native to good use, developers need to pay attention to the core issue, which involves choosing a reasonable "native" path.

Alibaba started to use cloud native early and has rich experience in applying cloud-native technologies in large-scale, highly reliable, and distributed systems. Enterprise Distributed Application Service (EDAS) developed by Alibaba cloud native team is a flagship aPaaS product on Alibaba Cloud. It also provided support for containers and Kubernetes in its early days. Recently, with the release of EDAS 3.0, EDAS has incorporated cloud native into its core functions, aiming to facilitate the implementation of cloud native in business, enhance application management based on the cloud-native platform, deliver technical benefits, and serve developers worldwide.

The following reveals how developers move into the cloud native era effortlessly and make good use of cloud native with the help of EDAS.

"Pure" Cloud Native

It is undeniable that EDAS is a commercial product on Alibaba Cloud. Meanwhile, cloud native is mainly advocated by the open-source community. Therefore, is so-called "pure" deceiving due to the significant difference between the two camps?

No. In fact, commercialization and open source are not mutually exclusive. They complement each other in many fields, but this topic is not the focus of this article. If we put aside the "origin", "pure" in our understanding refers to:

  • Resources are combined and abstracted in the native system, and the abstracted resources are not separated from the native system.
  • Existing cloud-native resources are used without intrusions, restrictions, or compromises.

Thanks to the openness of Kubernetes, the implementation mechanism of EDAS is not complicated. You only need to configure resources (applications) in Kubernetes and use declarative configuration to set these resources to desired states. Then, EDAS can detect changes and automatically maintain and adjust the states to finally keep them in line with your expectations. Therefore, you can manage their applications without the need to modify the version of Kubernetes. All you need to do is install the extensions provided by EDAS.

The following section describes in detail the methods and advantages of EDAS from two aspects.

Definition of Cloud-native Applications

As mentioned in the preceding part, EDAS abstracts applications into resources. In this process, the design of application definition is critical. With a declarative rule, application definition needs to cover the configurations, states, and relations of every subject in the software lifecycle and ensure good readability. Therefore, it must be concluded from the summary of a large number of applications, complex scenarios, and long-term maintenance. This is the only way to ensure that the definition is practical and can be efficiently applied to other applications.

Instead of reinventing the wheel, EDAS uses the Open Application Model (OAM), an open standard, for application definition, and co-constructs with it to enrich the content of the standard. We can say that EDAS is an implementation of OAM on Alibaba Cloud.

For developers, EDAS uses OAM to provide two key benefits:

  1. OAM eliminates the binding of developers to vendor platforms. Although different platforms support different O&M traits and underlying implementation methods, the same application configuration can be migrated between different platforms, as long as the vendors follow the same standards. Therefore, applications created by EDAS can be migrated to other platforms that also follow OAM standards.
  2. OAM hides specific underlying workload types, avoids the complexity of directly operating the underlying Kubernetes through a higher level of abstraction, provides independent ApplicationConfiguration resources, and applies different O&M capabilities by configuring Component with Trait. The design of Component and Trait properly separates the concerns of development and O&M teams, which can facilitate configuration and cooperation throughout the application lifecycle.

ApplicationConfiguration is also a Kubernetes custom resource (CR). Therefore, developers can use the kubectl tool to directly add, delete, query, and modify this resource. Like Kubernetes, EDAS is designed to be final state-oriented, so it will finally adjust applications to expected states. For developers, there is no difference between operating applications and operating conventional Deployment resources. In addition, EDAS can also be easily integrated with other CI/CD tools or GitOps workflows.

The following is an example of how to apply yaml in EDAS. You can use kubectl to apply a configuration like this, and then you can create an EDAS application that is deployed by using a specified JAR package.

apiVersion: core.oam.dev/v1alpha1
kind: ApplicationConfiguration
name: helloedas
namespace: default
componentName: stateless-component
instanceName: group-1
name: packageVersion
value: '{"buildPackageUrl":"http://demo.oss-cn-hangzhou-internal.aliyuncs.com/prod/demo/SPRING_CLOUD_PROVIDER.jar","showName":"2020-05-07
name: artifactFormat
value: FatJar
name: softwareComponents
value: '[{"componentId":"5","componentKey":"Open JDK 8","createTime":0,"desc":"Open
JDK 8","downloadUrl":"http://edas-hz.oss-cn-hangzhou.aliyuncs.com/agent/prod/files/jdk-8u65-linux-x64.rpm","expired":false,"id":"5","imageId":"","md5":"1e587aca2514a612b10935813b1cef28","type":"JDK","version":"8"}]'
name: replicas
value: "1"
name: showName
value: helloedas
name: description
value: ""
name: rollout
name: auto
value: "true"
name: batches
value: "1"
name: imagebuilder
name: tag
value: helloedas-1588854022
name: registry
value: registry-vpc.ap-northeast-1.aliyuncs.com
name: baseImage
value: registry-vpc.cn-hangzhou.aliyuncs.com/edas_unified/edas-openjdk:8-1.0
name: timeout
value: "900"

Edit Deployment

EDAS uses OAM to provide users with a unified application model, and the underlying workloads are mainly managed through Deployment.

Deployment is widely used to manage stateless applications, and it provides a variety of configuration items. For developers who are accustomed to using Deployment to manage applications, there often exist some relatively complex configuration requirements. So a contradiction arises here: When the configuration capability of a specific workload (Deployment in this case) exceeds the O&M capability defined by the OAM model, how can we retain the underlying custom configurations while maintaining the simplicity of OAM standards and the effectiveness of management?

Similar problems are not new in the history of software development, and the same is true for the development of programming languages. In the field of general development, advanced languages have long replaced machine languages to become the mainstream tools. Human intelligence is limited, and therefore "abstraction" is definitely an effective solution to complex problems, which is also an important reason for the application definition mentioned in the preceding part. However, we need to adopt some "exception" means to provide adequate flexibility.

Therefore, although there are some problems in using Deployment to operate applications directly, EDAS provides "plug-in" enhanced capabilities to solve these problems instead of completely taking back the control from Deployment.

In terms of implementation, EDAS uses patches by default to operate Deployment. EDAS will copy previous Deployment followed by adjusting corresponding configurations when it creates new Deployment, such as batch release. Therefore, as long as there is no conflict between configurations, your customized configurations can be completely inherited. You can modify the Deployment from the EDAS console by using the EDAS API or SDK, or by using the kubectl tool directly. The experience here is exactly the same as that of using Deployment independently.


"Professional" Cloud Native

EDAS is "pure" cloud native. Therefore, developers can understand and use EDAS in a native way. However, this is far from enough because cloud native is only a technical framework, while application management is a more specific business proposition. The aPaaS platform must be enriched and enhanced in order to provide solutions to problems in various fields, such as application hosting, application observability, and microservice governance.

EDAS has opened the door to cloud native for developers, and the next step is to incorporate the technical advantages of Alibaba Cloud and Alibaba middleware into aPaaS to help developers improve application management and save costs. In this way, EDAS can be enriched and enhanced.

The open-source community have provided many excellent tools and solved many problems, but they also have their shortcomings. For example:

  • They often designed a specific tool to solve a problem on a "point" or a "line", but solving real problems often requires collaboration from multiple angles. It will be more difficult to solve these problems with multiple tools, and the results of doing so will be less than satisfactory.
  • After in-depth use of open-source tools, the final problem may be the maintenance capabilities of the tools themselves, which will put higher requirements on the O&M team.

EDAS discarded the method of using a set of open-source tools to put functions together from the outset. Instead, it uses proven technologies or mature cloud products and focuses on the problems to build comprehensive and professional solutions for users. In this way, we can solve common problems in a more targeted way without worrying about integration and maintenance. Open-source tools are like Swiss Army knives, which are small, flexible, and on-demand tools. In contrast, EDAS is accurate, efficient, and scalable, so it is more like numerical control machine tools.

Of course, whether to use open-source tools or EDAS is never a single-choice question for developers. On the cloud-native platform, you can build optimal solutions by combining them to make use of their strengths and compensate for their shortcomings.

Instead of fully explaining EDAS functions, this article only provides several examples of typical microservice governance scenarios.

Canary Release

The canary release is an ideal release method that can effectively reduce the risk in version release. It is also widely used in O&M of online systems. We will not describe its benefits in detail here. In a simple canary release process, you only need to deploy a canary instance before full deployment to verify the new version. After the verification, you can release the version to the full network.

However, in order to implement canary release in a production system, you need to address additional issues as follows:

  • After you have deployed a canary instance, you need to direct specific request traffic to the canary instance.
  • Observe the running status of the canary instance and compare with that of the original instance.
  • If the canary release does not meet your expectations, you can roll back the entire release process.

It can be seen that a "complete" canary release requires not only the application hosting capability, but also the combination with observability and microservice governance. Therefore, it may be difficult to address these issues simply with one tool or simple Deployment.

EDAS also provides canary release, which supports traffic scheduling for both SpringCloud and Dubbo development frameworks. You only need to upload the JAR package, because this function is an out-of-box solution that requires no modifications to your applications. We will not describe the use of EDAS canary release in detail here.

The article outlines the important steps in EDAS canary release and the involved components. You can see that some cloud products are involved in the canary release process, in which Application Configuration Management (ACM) pushes canary traffic rules, Application Real-Time Monitoring Service (ARMS) collects and displays monitoring data, and Agent runs on the user side to ensure that the program can register services and report data according to the canary rules, without the users ever being aware of it.


Log Management

Another example is log management. Application logs are of great significance to online O&M, and log query has always been one of the most frequently used functions in EDAS. For developers, comprehensive log management functions are a necessity. With the "Log Center", EDAS provides developers with the following log management functions:

  • Real-time log enables you to view the frontend output of a specified container from the console.
  • Log directory enables you to easily add important specific log items to favorites, and provides ad hoc query of specified log file content as well as retrieval of specific modes.

Real-time log and log directory are mainly used for common ad hoc queries. However, comprehensive log management functions are not limited to query. These functions also include aggregation, dumping, statistical analysis, monitoring, and alerting. Alibaba Cloud Log Service (SLS) provides a perfect solution for these requirements. SLS is competent for scenarios such as storage, retrieval, complex statistical analysis, and multi-dimensional data visualization of large amounts of log data. Compared with popular open-source log systems, such as EFK, SLS can provide more functions, higher efficiency, better stability, and improved cost-effectiveness.

Therefore, EDAS is well integrated with Alibaba Cloud SLS. Developers only need to configure the log items to be collected in the Log Center, and then dump corresponding logs to SLS. This solution eliminates the need to configure a logtail client. For developers, the combination of EDAS and SLS is a golden pair that seamlessly connects applications and data to create a smooth user experience. It also allows generated data to be directly used for data-driven operation or intelligent O&M decision-making, which can bring significant value to products.

The following figure shows the design concept behind the log management functions of EDAS:


Developer Tools

Software development is an important phase in the software lifecycle. Development and O&M are inseparable. The quality of development determines the number of failures on the live network and the investment in maintenance, while the efficiency of development has impact on the speed of version iteration and the speed of problem fixing. EDAS not only helps software developers improve the efficiency of maintenance, but also pays attention to their experience in the production phase. Therefore, it can achieve higher productivity by improving the development experience.

EDAS provides a variety of developer toolsets to help developers test and deploy applications more efficiently. All cloud-native applications in EDAS are now supported. The following table lists the tools.


Move into the Cloud Native Era

Alibaba Cloud Enterprise Distributed Application Service (EDAS) is working to provide developers with "better" cloud-native technologies. On one hand, it is committed to turning cloud native from a technology that few people can master into a truly mature and user-friendly technology, in order to realize the value of cloud native. On the other hand, it integrates various technical advantages of Alibaba Cloud to enhance the capabilities of the cloud-native aPaaS platform, providing more powerful and stable application hosting service.

However, if these capabilities require you to make modification at a high cost, they are in the opposite direction to your goal. Therefore, the use of EDAS must be easier than using Kubernetes directly, and EDAS has made it. EDAS provides convenient accesses to applications developed based on common Java frameworks, such as SpringCloud and Dubbo. In most cases, you can use them without modifying the software or the development process. You only need to create an application and deploy the corresponding package in EDAS. EDAS also provides normal function support for applications that use images.

Following are some examples of how different applications can easily connect to EDAS:

  1. If you are already an EDAS user and have EDAS Kubernetes applications, you can click "Upgrade to New Application Management" to obtain new application management capabilities in just a few minutes. For detailed operations, see this document.
  2. If you are a user of Alibaba Cloud Container Service for Kubernetes (ACK) and have Deployment-based applications, you can import the cluster to EDAS and convert them into EDAS applications with one click. In this way, you can enjoy extensive capabilities from EDAS while retaining your original Deployment configuration information.
  3. If you have not used Kubernetes or EDAS, you can create a Kubernetes cluster from ACK, import the cluster to EDAS, and then deploy the JAR package or WAR package. If you follow these simple steps, all EDAS functions will be available out of the box.

Cloud native is a current and future trend. Whether to use cloud-native technologies is no longer a question. If you are eager to deal with the chaos of software, but you do not have full confidence in mastering cloud native, and you feel the pressure from the maintenance cost, you may as well leave all these problems to EDAS. You only need to focus on the business itself, so you can quickly move into the cloud native era without any burden.

0 0 0
Share on

You may also like


Related Products