All Products
Search
Document Center

Enterprise Distributed Application Service:Select an environment to deploy applications

Last Updated:Apr 27, 2023

Enterprise Distributed Application Service (EDAS) supports the Elastic Compute Service (ECS) environment and Kubernetes environment. Both environments allow you to host applications in them. However, ECS and Kubernetes provide different features. When you make business decisions or decide on the environment to which you want to migrate workloads, questions may arise. This topic describes and compares the ECS and Kubernetes environments. You can choose an environment based on your business requirements.

Background information

EDAS supports the ECS environment and Kubernetes environment. You can deploy applications in ECS or Kubernetes clusters. Both ECS and Kubernetes support the Spring Cloud, Apache Dubbo, High-Speed Service Framework (HSF) microservice frameworks. EDAS allows you to host, govern, and monitor Java applications that use the preceding frameworks. ECS and Kubernetes have different requirements for applications and technology stacks. EDAS also provides different application management features to ECS and Kubernetes.

How to select

Kubernetes is applicable to most scenarios. EDAS is integrated with Container Service for Kubernetes (ACK), which provides a wide array of application management features to help you increase resource utilization.

We recommend that you choose an environment based on the actual business requirements.

ScenarioEnvironment
  • Container images or non-Java applications
  • Multiple applications deployed on the same instance or a large number of applications deployed in the same environment
  • Kubernetes features or tools such as kubectl required to manage applications
Kubernetes
  • A large number of non-containerized applications deployed in the environment

    ECS is a better alternative to hosting non-containerized applications because it provides an easier way to reuse existing application O&M systems.

  • High requirements for the performance and stability of monolith applications
ECS
Note If your applications are already deployed in ECS clusters and you want to use advanced features provided by Kubernetes, you can migrate the applications to Kubernetes clusters.

Features supported by ECS or Kubernetes

The following table describes the features supported by ECS or Kubernetes. Y indicates supported, and N indicates not supported.
FeatureECSKubernetesRemarks
Deploy an applicationYYKubernetes provides more types of scheduling policy for deploying instances and allows you to deploy multiple applications on the same instance.
Start an applicationYYN/A
Stop an applicationYYN/A
Delete an applicationYYN/A
Scale an applicationYYN/A
Reset an applicationYNThis feature is not required in the Kubernetes environment. To reset an application, you can delete the Kubernetes pod in which the application is deployed.
Upgrade or downgrade a containerYYN/A
Roll back an applicationYYN/A
Horizontal scalingYYThe methods and rules of ECS and Kubernetes are different.
Scheduled scalingNYN/A
Batch deploymentYYN/A
Application groupsYNN/A
Configuration of application groupsYNN/A
Real-time log deliveryYYN/A
Log directoryYYN/A
Log ServiceYYN/A
Load balancingYYN/A
Health checkYYKubernetes uses readiness and liveness probes to perform health checks. The health check mechanism is different from that of ECS.
Java virtual machine (JVM) parametersYYN/A
Tomcat parametersYYN/A
Lifecycle hooksYYKubernetes supports the PostStart and PreStop hooks, which are different from those provided by ECS.
Environment variablesYYN/A
Canary releaseYYN/A
Traffic monitoringYYN/A
Traffic throttlingYYKubernetes implements traffic throttling for an application without the need to modify the application code.
Service listYYN/A
Configuration pushYYN/A
Event centerYYN/A
AlertsYYN/A
Application diagnosticsYYKubernetes provides an advanced application diagnostics feature that is integrated with monitoring services.
Resource purchasesYNN/A
Service meshNYN/A
Deployments from imagesNYN/A
Applications written in different programming languagesNYN/A
Network-attached storage (NAS)NYN/A

FAQ

Does the ECS environment allow me to deploy multiple applications on the same instance?

No. ECS does not allow you to deploy multiple applications on the same instance. If you want to deploy multiple applications on the same instance, choose the Kubernetes environment.

Does the ECS environment support applications written in different programming languages?

No. ECS does not support applications written in different programming languages. If you want to deploy applications written in different programming languages, choose the Kubernetes environment.

Do the ECS and Kubernetes environments support developer tools?

Yes. Both the ECS and Kubernetes environments support developer tools. However, the tools have different configuration requirements.

In the Kubernetes environment, how are nodes scaled out?

The Kubernetes environment automatically scales in and scales out pods. In most cases, a Kubernetes cluster does not create new nodes (ECS instances) or release existing nodes.

You can use features provided by ACK to automatically scale in and scale out nodes.

If I have mounted scripts to applications deployed on ECS instances, how do I migrate these applications to a Kubernetes cluster?

In the ECS environment, scripts that are mounted to applications are used to run specified commands when the change order enters the specified stage. ECS allows you to mount scripts to the following lifecycle stages of an application: create an instance, start the application, stop the application, and release the instance.

Kubernetes provides only the PostStart and PreStop lifecycle hooks. The lifecycle stages of a Kubernetes-based application are different from those of an ECS-based application. Therefore, you must modify the scripts before you migrate applications from ECS to Kubernetes.
  • If you want to mount scripts when you create an instance, you can compile the scripts into a Dockerfile and create an image from the Dockerfile.
  • If you want to mount scripts before you start the application, you can compile the scripts into a Dockerfile and create an image from the Dockerfile.

    In a Kubernetes pod, creating an instance and starting the application are considered the same process.

  • To mount scripts after the application is started, mount them as the PostStart hook.
  • To mount scripts before the instance is stopped, mount them as the PreStop hook.
  • We recommend that you gracefully shut down the application so that you can remove scripts that are mounted after the instance is stopped. For example, you can add a Shutdown hook to a Java application or send the SIGTERM signal to the scripts that you want to remove. Alternatively, you can move the scripts to the PreStop hook.
  • We recommend that you gracefully shut down the application so that you can remove scripts that are mounted before the instance is released. For example, you can add a Shutdown hook to a Java application or send the SIGTERM signal to the scripts that you want to remove. Alternatively, you can move the scripts to the PreStop hook.

    In a Kubernetes pod, stopping and releasing an instance are considered the same process.