Since the micro service was first proposed by Martin Fowler in March 2014, with the help of various micro-service frameworks such as Spring Cloud and Dubbo, IT has swept the whole IT technology field and become the most mainstream distributed application solution. But there are still many problems that have not been fundamentally solved, such as high technical threshold, insufficient multi-language support, strong code intrusion and so on. How to deal with these challenges has become the first question to be answered by the next generation of micro services. Until the Service Mesh came along, it all came together.
1 The pain of microservices
Back in early 2017, all the major microservices frameworks, from library-like Finagle and Hystrix to frames-like Spring Cloud and Dubbo, were essentially in-app solutions with three problems:
- High technical threshold: with the deepening of the micro service implementation level, in addition to basic service discovery, configuration and management of authorization, the team will inevitably face all kinds of new challenges in service governance level, including but not limited to distributed tracking, fusing the drop, gray scale distribution, failover, and so on, the team put forward a very high technical requirements.
Photo credit:Service Mesh: Next-generation microservices
- Lack of multilingual support: For larger teams, especially fast-growing Internet startups, multilingual technology stacks are the norm, as is cross-language service invocation, but there is currently no unified, cross-language microservice stack in the open source community.
- Highly intrusive code: Mainstream microservice frameworks (such as Spring Cloud and Dubbo) are more or less intrusive to business code, and the high cost of framework replacement leads to the low willingness of business teams to cooperate and the difficulty of microservice implementation.
The result of these problems is that the implementation of microservices is too difficult for small teams and too difficult for large companies to push.
Strike out on a different path
How to solve these three problems? The most obvious is the proxy mode, which handles all service invocations at the LB layer (such as Nginx, Apache HTTP Server), as well as some service governance issues (such as distributed tracing, fuse degradation). However, this scheme has two significant disadvantages. First, the centralized architecture, the performance and availability of the agent itself will be the bottleneck of the whole system. Second, the high complexity of operation and maintenance made the business team laugh and the operation and maintenance team cry.
Could this be the Peach Garden?
Service Mesh is here to stay! Since Linkerd’s first public use in September 2016, new frameworks like Linkerd, Envoy, Istio, NGINX Application Platform, Conduit, and others have sprung up. After microservices, The Service Grid and its Sidecar model led the way for 2017.
3 Service Grid
Definition 3.1 yuan
First, let’s take a look at how The service grid was described by William Morgan, the man who came up with it.
A service mesh is a dedicated infrastructure layer for handling service-to-service communication. Consists of a control plane and data plane (service proxies act as “mesh”). – William Morgan, What’s a Service Mesh? And Why Do I Need One?
The above paragraph clearly identifies the responsibility of the service grid to handle communication between services, which is at the heart of service governance. The word “a Dedicated Infrastructure layer” distinguishes the service grid from all previous microservice frameworks, that is, the service grid exists independently of the specific service. This fundamentally solves the multilingual support and code intrusion problems of the older microservices frameworks mentioned earlier. Moreover, due to the independence of the service grid, business teams no longer need to worry about the complexity associated with service governance, leaving it to the service grid.
Well, you might ask, isn’t that similar to the agency model mentioned earlier? The difference is the service grid’s original sidecar model. For each service instance, the service grid deployedone to one parallel sidecar process on the same host to take over all external network communications of the service instance (see figure below). This removes the bottleneck of centralized architecture in the proxy mode. At the same time, with the help of good frame packaging, operation and maintenance costs can be effectively controlled.
Photo credit:What’s a Service Mesh? And Why Do I Need One?
3.2 evolution
The service grid can be traced to three stages of evolution from scratch (see figure below). In the first stage, each service handles its own communications. In the second phase, all services communicate using a unified class library. In the third stage, the service no longer cares about the communication details and hands them over to the sidecar process. Just like in TCP/IP protocol, the application layer only needs to tell the TCP layer the content to be transmitted, and the TCP layer is responsible for delivering all the content to the destination. The application layer does not need to care about any details in the actual transmission process.
Photo credit:Pattern: Service Mesh
3.3 a time line
Finally, take a look back and forth at the young history of the service grid. Although the service grid was officially unveiled in September 2016, Airbnb actually launched a similar idea, the SmartStack, in 2013, which was limited to service discovery and didn’t attract much attention, There are also Netflix’s Prana and Vipshop’s OSP Local Proxy. After the service Grid was announced in 2016, frameworks such as Linkerd and Envoy began to emerge, and in 2017, they joined the Cloud Native Computing Foundation (CNCF), leading to a new generation of upstart Istio. In 2018, Istio will release version 1.0, which may be the beginning of the 2.0 era of microservices.
Photo credit:Service Mesh: Next-generation microservices
4 summary
Above is my service grid some simple introduction, welcome you to my message board message exchange, and we have a move. Stay tuned for the next installment, which will show you how to build an ISTIo-based service grid locally from scratch.
5 reference
- What’s a Service Mesh? And Why Do I Need One?
- Pattern: Service Mesh
- Awesome Service Mesh
- Service Mesh: Next-generation microservices
- Service Mesh 2017: A war of men