Background
When it comes to servers, the mainstream approach for most teams today is to purchase CVM servers from cloud service providers, install the necessary service software, database software, and other business requirements on the servers, and then launch the projects on them. After configuring the relevant network layers, the business services can be accessed via clients or browsers.
Essentially, cloud servers use virtualization technology to partition a physical server into multiple virtual machines. We can treat each virtual machine as a complete computer. This allows us to share a single physical server with other users (similar to a group of people renting a building).
Since building server-side applications in the form of virtual machines remains the mainstream for most teams, why is WeChat Cloud Hosting based on container services rather than virtual machines?
Comparison
Service operations and maintenance (O&M) in a virtual machine form are highly labor-intensive. When performing service changes or scaling up/down, the complex and specialized O&M tasks heavily test the technical proficiency and experience of O&M personnel. This challenge is particularly pronounced during rapid project expansion.
This has led to the emergence of many server O&M panels and site-building tools to assist development teams in completing O&M operations. While this approach can save O&M resources to some extent, as the business matures, more bottlenecks and drawbacks tend to surface and worsen:
- Automated deployment is difficult. Although it can be achieved using various tools, there is still significant room for error.
- Running multiple different instances of an application makes it hard to have them coexist on the same server.
- If a server goes down, recovery takes a long time because manual processes are required.
- The process of deploying new versions is mostly manual, making rollbacks difficult.
- There is a high probability of significant differences between the testing environment and the production environment, preventing some production issues from being detected during testing.
- Horizontal scaling by adding new instances is difficult.
Container technology avoids the issues associated with traditional service architecture models and has risen as a new architectural paradigm in recent years. By standardizing the packaging of business code along with its dependent environment resources into an image, and then starting an instance on the server to run this image, services can be provided efficiently.
For example, if you go to an internet cafe to work, you must use their clean OS and install your own office software before you can start working. This is analogous to the traditional mode, where targeted O&M is required based on different service facilities to run your business project.
In this example, a container service is like bringing your own hard drive (or USB drive) with your operating system stored on it. At the internet cafe, you simply plug in your drive and immediately use your familiar system. Furthermore, you can replicate your drive multiple times, allowing multiple computers to run your system rapidly with exactly the same results.
Compared to traditional services under virtual machines, container services have the following key characteristics:
- Easy deployment: New container images can directly replace the entire old version.
- Automated deployment is relatively easy and can be fully driven by CI/CD.
- Rolling back a failed deployment is convenient; you only need to switch back to the previous image.
- Application upgrades do not require complex upgrade configuration processes or tedious steps.
- The same container image can be thoroughly tested in different environments and then deployed directly to production, ensuring the testing environment is identical to the production environment.
- The system is easier to recover from downtime because new containers with the application image can be quickly started on new hardware resources and attached to the same data source.
- Developers can test new features locally in a more realistic environment using containers.
- Hardware resource utilization is more efficient, as multiple containerized applications can run on a single host.
- Containerization provides a solid foundation for zero-downtime upgrades, canary deployments, high availability, and horizontal scaling.
Benefits
WeChat Cloud Hosting is built on container services, which play a decisive role in ensuring high availability and high stability of service operations.
Multiple containers work together to form a service system and provide business services to external users. This requires the support of container orchestration technology. The mainstream container orchestration technology today is Kubernetes (abbreviated as K8S). Configuring K8S proficiently and appropriately also requires a certain level of technical expertise.
This is akin to flying an airplane skillfully, which requires dedicated professional training and experience accumulation to achieve zero errors.
WeChat Cloud Hosting fully takes over K8S operations and maintenance configurations. You do not need to worry about how to configure K8S and container services or how they interact. By simply using the easy-to-use control panel provided by WeChat Cloud Hosting, you can deploy your services with ease.
WeChat Cloud Hosting is like removing the complex control panel from an airplane and replacing it with a user-friendly interface while providing extensive automated services. You can fly the airplane proficiently without requiring specialized training.