As a big winner of container cluster Management technology competition, Kubernetes has been closely connected with micro-services, and enterprises that adopt kubernetes often start to explore the micro-service architecture. However, the problems faced by micro-service practice in different stages of different enterprises vary widely, and they are destined to produce bifurcation on the technical route. How to choose the right technology is the first problem faced by every team practicing microservices. NetEase Cloud is Kubernetes's first batch of heavy users, in different business scenarios to solve a lot of challenges, in this article, NetEase Cloud Chief Solution architect Liu Chao combed the kubernetes based on the establishment of micro-service system of the advanced Road.
The necessity of micro-service
The development of a product, usually can be divided into cold start stage, high-speed growth stage and mature stage. During the cold start phase of the product, the requirement is to validate the business with the simplest architecture. To NetEase Kaulahai Purchase (hereinafter referred to as "koala") as an example, the initial architecture design goal is to quickly start, verify the product direction, the architecture includes online, cache, offline and management services four aspects, namely the general e-commerce platform plus cross-border e-commerce necessary invoicing system, using the Oracle database, OpenStack manages virtual machines (VMS) without considerations such as high concurrency.
Product high-speed growth stage, business scale gradually expanded, product complexity also with the increase, the enterprise needs to solve the problem of fast iteration, high reliability and high availability, a natural choice is a service split, split a single structure into smaller modules, and follow Conway's Law, with 5-9 small teams to adapt to the changes in the architecture. In the case of koalas, for example, koalas have evolved a variety of new modules in the high-speed growth phase, such as individual payment modules, warehouse modules, third-party merchant modules, push modules, etc., and build service discovery capabilities based on the Dubbo framework to support mutual calls between modules.
Service is the main solution to the problem of change. Throughout the evolution of the structure of the process, the various modules are facing explosive growth, such as sea Amoy, self-owned, third-party business supply chain, Web, APP, H5 presentation, time-limited purchase, second kill, pre-sale activity page, as well as warehouse and logistics system, payment system docking, tight coupling is reaching, engineering bloated, The impact of iteration speed, separate on-line more conducive to adapt to the needs of business development. Koalas in the high-speed growth phase first in accordance with the home page, activity pages, coupons, payment and other dimensions of vertical split, and then continue to evolve into more than 100 interrelated modules, change frequency from 2 times a day to 1000 times a day, product quality increased by 52%.
The advantages and challenges of containerized
After splitting into a large number of small modules, there are many new challenges associated with the virtual machine and the service architecture, so there is a need for containerized.
Liu Chao explained that the first thing to do before splitting is to solve the "hop" problem, that is, the need to ensure functionality or the original functionality, code quality or the original code quality, will not introduce new bugs. He argues that microservices need to be
Different ways to play kuberneter in different stages of micro-service