Solution Overview
This section provides CCE best practices to walk you through the application containerization.
What Is a Container?
A container is a lightweight high-performance resource isolation mechanism implemented based on the Linux kernel. It is a built-in capability of the operating system (OS) kernel.
CCE is an enterprise-class container service based on open-source Kubernetes. It is a high-performance and high-reliability service through which enterprises can manage containerized applications. CCE supports native Kubernetes applications and tools, allowing you to easily set up a container runtime in the cloud.
Why Is a Container Preferred?
- More efficient use of system resources
A container does not require extra costs such as costs for hardware virtualization and a complete OS. Therefore, a container has higher resource usage. Compared with a VM with the same configurations, a container can run more applications.
- Faster startup
A container directly runs on the host kernel and does not need to start a complete OS. Therefore, a container can be started within seconds or even milliseconds, greatly saving the development, testing, and deployment time.
- Consistent runtime environment
A container image provides a complete runtime environment to ensure environment consistency. In this case, problems (for example, some code runs properly on machine A but fails to run on machine B) will not occur.
- Easier application migration, maintenance, and scaling
A consistent runtime environment makes application migration easier. In addition, the in-use storage and image technologies facilitate the reuse of repeated applications and simplifies the expansion of images based on base images.
How to Containerize an Application
To containerize an application, you can:
- Containerize an entire monolithic application without changing the code and architecture.
- Containerize first the application components that are frequently updated or have high auto scaling requirements.
- Break the application down into microservices and then containerize them.
Table 1 lists the advantages and disadvantages of the three modes.
|
How to Containerize |
Advantage |
Disadvantage |
|---|---|---|
|
Method 1: Containerize an entire monolithic application. |
|
|
|
Method 2: Containerize first the application components that are frequently updated or have high auto scaling requirements. |
|
Services need to be partially decoupled. |
|
Method 3: Break an application down into microservices and then containerize them. |
|
Breaking down services into microservices requires numerous changes. |
Mode 1 is used as an example in this tutorial to illustrate how to containerize an enterprise resource planning (ERP) system.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot