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.
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.
Features supported by ECS or Kubernetes
|Deploy an application||Y||Y||Kubernetes provides more types of scheduling policy for deploying instances and allows you to deploy multiple applications on the same instance.|
|Start an application||Y||Y||N/A|
|Stop an application||Y||Y||N/A|
|Delete an application||Y||Y||N/A|
|Scale an application||Y||Y||N/A|
|Reset an application||Y||N||This 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 container||Y||Y||N/A|
|Roll back an application||Y||Y||N/A|
|Horizontal scaling||Y||Y||The methods and rules of ECS and Kubernetes are different.|
|Configuration of application groups||Y||N||N/A|
|Real-time log delivery||Y||Y||N/A|
|Health check||Y||Y||Kubernetes uses readiness and liveness probes to perform health checks. The health check mechanism is different from that of ECS.|
|Java virtual machine (JVM) parameters||Y||Y||N/A|
|Lifecycle hooks||Y||Y||Kubernetes supports the PostStart and PreStop hooks, which are different from those provided by ECS.|
|Traffic throttling||Y||Y||Kubernetes implements traffic throttling for an application without the need to modify the application code.|
|Application diagnostics||Y||Y||Kubernetes provides an advanced application diagnostics feature that is integrated with monitoring services.|
|Deployments from images||N||Y||N/A|
|Applications written in different programming languages||N||Y||N/A|
|Network-attached storage (NAS)||N||Y||N/A|
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?
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.
- 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.