"Services to the cloud" has always been an ongoing process. During the period from 2010 to 2017, the focus was on "own physical construction" to "IAAS infrastructure as a service", and various cloud vendors have launched networks on this basis. Products, database products, storage products, and products at the "PAAS" level to promote the process of cloud migration, which we call "Service Cloud 1.0"

"Services to the cloud 1.0" essentially means migrating self-built physical service facilities to service facilities provided by cloud vendors, equipped with a large number of professional tools. However, in this process, the internal service technology architecture selected by developers is rarely touched; most of the current circulation is the traditional service architecture model.

What is the traditional service architecture model and what are its characteristics? Here are a few examples for you to experience:

a. Use the local file system for persistent storage, with data files mixed with application files.

b. Run many services on the same server, such as MySQL, Redis, Nginx, and a lot of scheduled tasks.

c. Install and upgrade using a hodgepodge of scripts and manual processes.

d. Configurations are stored in files, usually scattered across multiple locations, and mixed with the application's files.

e. Communication between processes is via the local file system (such as putting a file on disk, read by another process) rather than TCP/IP.

f. Designed in such a way that only one instance of the application runs on a single server.

These characteristics will expose many problems in the process of performing maintenance, such as:

a. Automated deployment is difficult, and although it can be achieved with various tools, there is still a lot of room for moisture.

b. If you need to run multiple different instances of the application, it is difficult to have multiple instances coexist on the same server.

c. If the server is down, it will take a long time to recover due to the manual process required.

d. The process of deploying a new version is basically manual, or mostly manual, and it is difficult to roll back.

e. It is very likely that the test environment is quite different from the production environment, so that some production environment problems cannot be discovered during the test.

f. It is difficult to scale out by adding new instances.

These problems will become more and more prominent with the development of the business, and ultimately consume a lot of labor costs and accumulate many risk factors. Even if the service facilities are migrated to the cloud and have a strong environment, the maintenance of internal systems will always hinder and affect high-quality services. .

Container technology, which avoids the problems caused by the traditional service architecture model, has emerged as a new architecture model in recent years.

Container service is to package the business code and the environment resources it depends on into an image in a standardized way, and then start an instance in the server to run the image to provide services.

For example, if you go to work in an Internet cafe and use the pure system of the Internet cafe, you need to install the office software you need before you can start working. Run your own business project. In this example, the container service is that you bring a hard disk (or a U disk), store your office system in it, and directly insert your hard disk into the Internet cafe, and you can use the familiar system immediately.

We summarize several characteristics of container technology:

a. Easy to deploy, you can directly replace the entire old version with a new container image.

b. It is also relatively easy to automate deployment and can be completely driven by CI.

c. For rollback when deployment fails, just switch to the previous image, which is very convenient.

d. The application upgrade does not need to consider the complicated upgrade configuration process, and does not need to perform tedious steps.

e. The same container image can be fully tested in different environments and then directly deployed to the production environment to ensure that the test environment is exactly the same as the production environment.

f. The system is easier to recover from an outage because a new container with this application image can be quickly launched on a new hardware resource and attached to the same data source.

g. Developers can test new functionality locally as containers in a more realistic environment.

h. The utilization of hardware resources is more efficient, and multiple container applications can be run on a single host.

i. Containerization is a solid foundation to support zero-downtime upgrades, canary deployments, high availability, and scale-out.

What is the relationship between container technology and Docker? Docker is a technical tool for building containers and is currently popular. Just like Android and IOS (Docker) are the more popular mobile terminal operating systems (container technology), because they are popular, all manufacturers will adapt, so that technical solutions can be run smoothly without barriers. When we build more and more services, the same service may contain multiple container instances due to concurrency, so how to effectively manage and coordinate the location resources of multiple containers? How to handle container-to-container communication? This requires container orchestration technology.

Kubernetes is currently the most popular container orchestration technology. It provides APIs to control how and where containers are executed, execute Docker containers and adjust workloads, and solve some complex tasks when deploying multiple containers across multiple servers.

Let's take a look at the configuration required by standard container services. It is suitable for teams who are very familiar with container orchestration. It can be configured flexibly and adjusted according to their own needs.

WeChat cloud hosting provides easy-to-configure and high-availability container services by simplifying the complicated configuration process; and integrates business-related suites, including automatically scalable databases, object storage, etc. Some accumulation to create a safe one-stop back-end service platform with ecological characteristics.

That is to say, even if you do not have WeChat-related application services, you can still use WeChat cloud hosting to provide services for your own business. It has strong advantages in preventing brush attacks and secure links.

Tencent Cloud and Qianfeng jointly launched a high-quality project course " Fengyun Ticketing System - Fengyun Ticketing Management System Based on WeChat Cloud Hosting " has been launched on the "Tencent Cloud Developer Community" to help you understand the complete WeChat cloud hosting deployment process, learn Practical small program development. The famous teachers of the institution teach hands-on, a total of 3 hours full of dry goods courses, come and get the full set of courses:

" Fengyun Ticketing System - Fengyun Ticketing Management System Based on WeChat Cloud Hosting "

Get free course benefits: Tencent Cloud product vouchers


腾讯云开发者
21.9k 声望17.3k 粉丝