头图

"Service to the cloud" has always been an ongoing period. During the period 2010-2017, the focus was on "own physical construction" to "IaaS infrastructure as a service", and various cloud vendors launched networks on this basis. Products, database products, storage products, provide "PaaS" level products to promote the process of going to the cloud, we call it "service going to the cloud 1.0".

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

What is the traditional service architecture model? What are the characteristics? Below I will list a few of you to compare and feel

  1. The local file system is used for persistent storage, and data files and application files are mixed together.
  2. Run many services on the same server, such as Mysql, Redis, Nginx, and a lot of timed tasks.
  3. Use a hodgepodge of scripts and manual processes for installation and upgrades.
  4. The configuration is stored in files, usually scattered in multiple locations, and mixed with the application files.
  5. The communication between processes is carried out by means of the local file system (for example, a file is placed on the disk and another process reads it), not TCP/IP.
  6. It is designed in 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:

  1. Automated deployment is difficult. Although it can be achieved through various tools, there is still a lot of room for water.
  2. If you need to run multiple different instances of the application, it is difficult to have multiple instances coexist on the same server.
  3. If the server is down, it will take a long time to recover due to manual processes.
  4. The process of deploying a new version is basically manual, or most of it is manual, and it is difficult to roll back.
  5. It is very possible that the test environment and the production environment are quite different, causing some production environment problems to not be discovered during the test.
  6. It is difficult to scale horizontally by adding new instances.

These problems will become increasingly prominent with the development of the business, which will eventually consume a lot of labor costs and accumulate many risk factors. Even if the service facilities are on the cloud and there is a strong environment, the maintenance of internal systems will always hinder and affect high-quality services. .

Container technology, circumventing the problems caused by the traditional service architecture model, has begun to emerge as a new architecture model in recent years.

The container service is to package the business code and the environmental resources it depends on into an image through a standardized method, and then start an instance in the server to run the image to provide the service.

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 to start working. Own business projects are up and running.

In the above example, the container service is that you bring a hard disk (or a USB flash drive), store your office system in it, and insert your hard disk directly into the Internet cafe, and you can use the familiar system immediately.

In order to better explain the container service, we have prepared a 30-minute live broadcast to help you experience the process of using the container service in practice. Click on the end of the article to read the original text to browse it.

Through a 30-minute demonstration, a more comprehensive demonstration of the use and development process of container technology, from which the characteristics of container technology can be summarized:

  1. Easy to deploy, you can directly replace the entire old version with a new container image.
  2. Automated deployment is also relatively easy and can be completely driven by CI.
  3. It is very convenient to roll back when the deployment fails, as long as you switch to the previous image.
  4. Application upgrades do not need to consider complicated upgrade configuration procedures, and do not need to perform cumbersome steps.
  5. 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 completely consistent with the production environment.
  6. The system is easier to recover from a downtime because a new container with this application image can be quickly started on a new hardware resource and attached to the same data source.
  7. Developers can test new features locally in the form of containers in a more realistic environment.
  8. The use of hardware resources is more efficient, and multiple container applications can be run on a single host.
  9. Containerization is a solid foundation to support zero-downtime upgrades, canary deployment, high availability, and horizontal expansion.

Docker is always mentioned in the replay. 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 more popular in mobile terminal operating systems (container technology). Because of their popularity, various manufacturers will adapt, so that technical solutions can be unimpeded and have no barriers to entry.

When we build more and more services, the same service may contain multiple container instances due to concurrency, then how to effectively manage and coordinate the location resources of multiple containers? How to deal with the communication between containers? This requires container orchestration technology.

Kubernetes is currently the most circulating container orchestration technology. It provides APIs to control the execution mode and location of containers, operate Docker containers and adjust workloads, and solve some complex tasks when adjusting the scale of multiple containers across multiple servers.

Kubernetes is currently the most circulating container orchestration technology. It provides APIs to control the execution mode and location of containers, operate Docker containers and adjust workloads, and solve some complex tasks when adjusting the scale of multiple containers across multiple servers.

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

Familiar with Kubernetes and independent maintenance are also costly. It requires a relatively good professional background to be able to do well. For fast-growing enterprises and business teams, it is difficult to make such a large accumulation. When we don’t know much about container services, how do we use container services?

WeChat Cloud Hosting provides easy-to-configure and highly available container services by simplifying the complicated configuration process; and integrates business-related packages, including databases that can be automatically expanded and contracted, object storage, etc., and also provides a lot of WeChat in-service technology Some accumulations to create a safe one-stop back-end service platform with ecological characteristics.

In other words, even if you don't have WeChat related application services, you can still use WeChat cloud hosting to provide services for your business. It has strong advantages in anti-brush attacks and secure links.

So how to migrate projects to cloud hosting? We have summarized a migration guide and suggest that you learn and use it in conjunction with the live playback video.

If your company wants to get professional support and want some preferential strategies, you can sign up for the cloud hosting enterprise incentive plan, and the team will have someone to follow up and help.

Click to get: "Complete Live Replay" and "Supporting Source Code"


CloudBase云开发
425 声望438 粉丝

云开发(Tencent CloudBase,TCB)是云端一体化的后端云服务 ,采用 serverless 架构,免去了移动应用构建中繁琐的服务器搭建和运维。同时云开发提供的静态托管、命令行工具(CLI)、Flutter SDK 等能力极大的降...