Does Service Mesh know?

Source: Internet
Author: User

Service Mesh understand?

Jane Book polyester.
Reprint please indicate original source, thank you!
If you have finished reading and feel the harvest, welcome to the attention of praise.

Directory

  1. Background
  2. What is it
  3. What to do
  4. How to Achieve
  5. Advantage
  6. Problem
  7. Prospect

1 background

1.1 + languages

Micro-service concept is to promote the use of different business to the most suitable for its language development, the reality is true, especially the rise of AI, the general large-scale internet companies exist in C + +, Java, Golang, PHP, Python, NodeJs and other language projects, This means that each language needs to implement the same functional service framework. However, the SDK of the service framework is usually very heavy, and it needs to realize the functions of service registration and discovery, service routing, load Balancing, service authentication, service demotion, service limit flow, network transmission, etc., so the cost of this piece is self-evident.

1.2 Product Delivery

In the process of upgrading the service components, the business system needs to upgrade the dependent service components package, the upgrade may have a variety of version conflicts, and the gray-level verification process may be a bug, the business upgrade version is painful, often a component package wants to cover the upgrade, it takes a long time, Delivery efficiency is extremely low. As the business continues to evolve, the scale of the business and the efficiency of our delivery have become a major contradiction, so the component team expects to develop the infrastructure with greater efficiency rather than the need for infrastructure iterations to be constrained by the scale of the component's use.

1.3 Cloud native

In a cloud-native architecture, a single application may consist of hundreds of services; There may be thousands of instances of each service; And each of these instances may be in a state of flux, because they are dynamically dispatching a Kubernetes-like orchestration. Inter-service communication is not only very complex, but also the basis of runtime behavior. Managing inter-service communication is important to ensure end-to-end performance and reliability. Therefore, managing inter-service communication is very important to ensure end-to-end performance and reliability.

Based on the above background, Service Mesh has been generated.

What is 2?

In the above context, the industry has also done some exploration, such as the only product will be in the service callers add the proxy layer, the service components of the common logic function in the proxy implementation, and the rest of the business interaction with the API function in the Client implementation, so as to reduce the cost of multiple languages. In addition, Sina Weibo also uses the PROXY scheme to provide support for service registration and invocation in the minority languages. In fact, this Proxy structure is similar to the current service mesh, but there is no service mesh this term.

In 2016, buoyant's CEO William proposed the concept of Service Mesh. Service Mesh is an infrastructure layer that handles inter-service communication and is responsible for the reliable delivery of requests in a complex cloud-native service topology. Generally implemented as network proxies, usually with business services deployed together, business services are not perceived.

3 What to do

3.1 Service Discovery

Application changes that run in microservices mode are very frequent, and the problem with frequent increases in application instances is that it is more complex to pinpoint new instances and avoid sending requests to instances that are not already present. Service Mesh provides a variety of simple, unified, platform-independent services discovery mechanisms, such as a service discovery mechanism based on dns,k/v key-value-to-store.

3.2 Dynamic Routing

As service providers focus on delivering high stability, high availability, and high SLA services, in order to achieve the stated objectives, a variety of application deployment strategies emerge as far as possible from technical means to non-service outage deployments to avoid changes that lead to disruption and stability degradation of services, such as: Blue/green deployment, Canary deployment, but implementing these advanced deployment strategies is often difficult. If you can easily cut application traffic from one version to another, or dynamically switch from one data center to another, you can even control how much traffic is switched through a central control layer. The dynamic routing mechanism provided by Service Mesh and the specific deployment strategy, such as the Blue/green deployment, make it easier to achieve these goals.

3.3 Load Balancing

In the running environment, the microservices instances are usually in a dynamic state, and there is often a tendency for individual instances to fail to provide services, reduce processing power, and lag. However, because all requests are visible to Service Mesh, it is possible to provide advanced load balancing algorithms for smarter, more efficient traffic distribution, reduced latency, and increased reliability.

3.4 Request Fuse

Outage or unhealthy service instances in a dynamic environment can cause service outages to occur frequently, requiring applications or other tools to have rapid monitoring and removing the ability to provide service instances from a load-balanced pool, which is also called fusing, so that applications do not need to consume more unnecessary resources to keep trying, It is a quick failure or demotion, and even this avoids some potential association errors. Service Mesh makes it easy to implement a fusing mechanism based on request and connection levels.

3.5 Secure Communications

Security is an important part of the entire company and business system, and it is very difficult to implement and control. In the micro-service environment, the communication between different service instances becomes more complex, so how to ensure the communication is very important in the situation of security and authorization. By implementing security mechanisms such as TLS plus decryption and authorization on Service Mesh, you can not only avoid repetitive implementations in different applications, but also easily update security at the entire infrastructure level without even needing to do anything about the application.

3.6 Multi-lingual support

Because Service Mesh acts as a transparent proxy for standalone operation, it is easy to support multiple languages.

3.7 Multi-protocol support

As with multi-lingual support, it is easy to implement multiprotocol support.

3.8 Metric and Link Tracking

The visibility of service Mesh across the infrastructure layer makes it possible to expose not only the operational data of a single service, but also the operational data of the entire cluster.

3.9 Retry

The retry capability of the service Mesh avoids embedding it into the business code, while the deadline allows the application to allow the maximum lifetime of a request, rather than endless retries.

4 How to achieve

The end-of-service Mesh implementation is implemented using SIDECAR side-car deployment methods, such as service discovery, service routing, load balancing and other functions within Sidecar, Sidecar as a separate process and business services deployed on the same machine.
The concrete implementation of Sidecar is called the data plane, and as the control logic of Sidecar, it is called the control plane.


Service Mesh Frame composition

The application as the initiator of the service, only needs to send the request to the Local Service grid proxy in the simplest way, then the grid agent will perform subsequent operations, such as service discovery, load balancing, and finally forwarding the request to the target service. When a large number of services call each other, the service invocation relationship between them forms a grid.

Service Mesh brings a new direction to the infrastructure components, through the sidecar of the service mesh, the functionality of the underlying components down to the sidecar, transparent to the business, easy to upgrade maintenance, and solve multiple language problems.

5 advantages

5.1 + languages

Because service Mesh shares most of the component functionality, it is simpler to implement in a multi-language implementation, and the respective language needs to implement some simple logic to provide all the functionality of the serviced component, thus greatly reducing the implementation cost of the multilingual service component.

5.2 Product Delivery

Most of the functionality of the component is moved to the service Mesh, isolated from the business logic, independently upgraded, operational, transparent to the business, and improved in the delivery capabilities of the component. Beyond the traditional development frameworks such as Spring Cloud and Dubbo, there is not only a lot of functionality that these frameworks can provide, but more importantly, there is no need for the application to make a large number of changes to this, and developers do not have to do a lot of knowledge on the implementation of the above capabilities to reduce the cost of learning service components.

5.3 Cloud native

In a complex cloud-native architecture, service Mesh can better manage inter-server communication, which is important to ensure end-to-end performance and reliability.

6 questions

6.1 Performance

Service Mesh mode services invocation, compared to the direct call of the service framework, increases the interaction with Sidecar in the services mesh, which will inevitably sacrifice some performance, but because it is local network communication, not through the network layer transmission, its performance loss should be within the controllable range.

6.2 Availability

Service mesh is provided by a separate local process to provide services to the application, but also on the entire service call chain to increase the point of failure, which will inevitably lead to a decrease in availability, which provides the overall design of service Mesh to make higher requirements to ensure the availability of services.

7 Outlook

An article that service mesh will be the next Generation service architecture, we also look forward to better service mesh development, to increase the convenience of business, reduce development costs, and provide better technical services.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.