backgroundFinally, we are entering the service mesh series that everyone is interested in. We have already explained:
Basically, it is enough for us to develop a normal-scale web application; however, in enterprises, there are often complex application call relationships, and requests between applications also need to be managed, such as common current limiting, degradation, tracing, monitoring, load balancing and other functions. Before we used Kubernetes, these problems were often solved by microservice frameworks, such as Dubbo and SpringCloud, which had corresponding functions. But when we use Kubernetes, these things should be handed over to a dedicated cloud-native component to solve, which is Istio, which we will talk about this time. It is the most widely used service mesh solution. picture The official explanation of Istio is relatively concise, and the specific functional points are just mentioned:
picture Combined with the official architecture diagram, we can see that Istio is divided into the control plane and the data plane. The control plane can be understood as the management function of Istio itself:
The data plane can be simply understood as our business application represented by Envoy. All traffic in and out of our application will pass through the Envoy proxy. Therefore, it can realize functions such as load balancing, fuse protection, authentication and authorization, etc. InstallFirst install the Istio command line tool
Linux uses: Mac can use brew: For other environments, you can download Istio and configure environment variables: We can then install the control plane using the install command.
picture This profile has the following different values. For demonstration purposes, we will use demo. picture use We then label the namespace so that the Istio control plane knows which namespace’s Pod will automatically have the sidecar injected. Here we enable automatic injection of sidecar for the default namespace, and then deploy the deployment-istio.yaml we used earlier. At this point, you will see that each Pod has two containers (one of which is the istio-proxy sidecar), which is the code used in the previous gRPC load balancing test. picture We still conduct the load balancing test and the results are the same, which shows that Istio works. When we look at the sidecar log again, we can see the traffic we just sent and received: SummarizeThe content of this issue is relatively simple and is mainly related to installation and configuration. The next issue will update how to configure timeout, current limiting and other functions of internal service calls. In fact, most of the current operations are more O&M-oriented. Even subsequent functions such as timeout configuration only require writing YAML resources. However, when used in production, we will provide developers with a visual management console page, allowing them to flexibly configure these functions that originally needed to be configured in YAML. picture In fact, all major cloud platform vendors provide similar capabilities, such as Alibaba Cloud's EDAS. All source code of this article can be accessed here: https://github.com/crossoverJie/k8s-combat |
<<: Introduction to Socks5 Proxy Protocol
>>: Content Delivery Network (CDN) System Design
[[319142]] Recently, in order to accelerate the i...
"The return of thin and light design is part...
With the development of the Internet and the incr...
GreenCloudVPS released an email about its 8th ann...
In "TCP/IP Basics: Data Encapsulation",...
[June 10, Beijing] The 2021 Huawei HMS Global App...
Name Explanation The Internet of Things is an imp...
[[345832]] "Read the Papers" is a serie...
Judging from the scene of MWC2018, 5G has become ...
"Times make heroes" is an eternal truth...
Lossless video transmission is critical to variou...
This article takes stock of the smart city applic...
AlphaVPS's Black Friday special packages incl...
Sharktech cancelled the lowest-priced $59/month L...
[Beijing, China, October 13, 2020] Today, the 6th...