当前位置:网站首页>Istio Troubleshooting: uneven grpc service load
Istio Troubleshooting: uneven grpc service load
2022-06-24 12:43:00 【imroc】
This article excerpts from istio Learning notes
The phenomenon
grpc call , The same client Your request always hits the same server Of pod, Cause uneven load .
analysis
grpc Is based on http2 Long connection of , Multiple requests to reuse the same connection . If not istio, Use only ordinary k8s service, Will not perceive grpc Agreed , Just as tcp To forward , Load balancing at the connection level , No load balancing at the request level . But in istio in , The default will be for grpc Load balancing at the request level , If uneven load is found , It is usually not configured correctly .
Must let grpc Load balancing at the request level , The core is to let istio Correct identification is grpc agreement , Don't configure it to tcp, use tcp Then load balancing can only be performed at the connection level , Request levels can be loaded unevenly .
resolvent
- If you want to be exposed ,gateway in protocal To configure GRPC no need TCP, Example :
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: grpc-gw
namespace: demo
spec:
selector:
app: istio-ingressgateway
istio: ingressgateway
servers:
- hosts:
- '*'
port:
name: grpc-demo-server
number: 9000
protocol: GRPC # Use here GRPC no need TCP- If you define vs, Need to use http Match without tcp, because grpc stay istio Chinese matching is also used http Field , Example :
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: grpc-svc
namespace: demo
spec:
gateways:
- demo/grpc-gw
hosts:
- '*'
http: # Use here http no need tcp
- match:
- port: 9000
route:
- destination:
host: grpc.demo.svc.cluster.local
port:
number: 9000
weight: 100- Deploying services service Of port name Need to use "grpc-" Opening definition , Give Way istio Be able to correctly identify , Example :
apiVersion: v1
kind: Service
metadata:
name: grpc
namespace: demo
spec:
ports:
- name: grpc-9000 # With grpc- start
port: 9000
protocol: TCP
targetPort: 9000
selector:
app: grpc
type: ClusterIPFor more protocol specification methods, please refer to istio Best practices : Explicitly specify the protocol for the service
边栏推荐
- RTMP streaming platform easydss video on demand interface search bar development label fuzzy query process introduction
- Chenglixin research group of Shenzhen People's hospital proposed a new method of multi group data in the diagnosis and prognosis analysis of hepatocellular carcinoma megps
- [5 minutes to play lighthouse] create an immersive markdown writing environment
- Making daily menu applet with micro build low code
- A scheme for crawlers to collect public opinion data
- Tencent Youtu, together with Tencent security Tianyu and wechat, jointly launched an infringement protection scheme
- Five minutes to develop your own code generator
- A hero's note stirred up a thousand waves across 10 countries, and the first-line big factories sent people here- Gwei 2022 Singapore
- The pod is evicted due to insufficient disk space of tke node
- Engage in audio and video development? Several things I have to say about SRT live broadcast protocol
猜你喜欢

How to do research on plant endophytes? Special topic on Microbiology

mLife Forum | 微生物组和数据挖掘

【概率论期末抱佛脚】概念+公式(不含参数估计)

【数据库】期末复习(计科版)
[mysql_16] variables, process control and cursors

微医CodeReview工具链

文本转语音功能上线,可以体验专业播音员的服务,诚邀试用
Deep parsing and implementation of redis pub/sub publish subscribe mode message queue

Opencv learning notes - Discrete Fourier transform

《回归故里》阅读笔记
随机推荐
Continuous testing | test process improvement: practice continuous testing within iterations in coding
SMS SMS
Istio practical skills: using prism to construct multi version test services
Design and implementation of high performance go log library zap
[highlights] summary of award-winning activities of Tencent cloud documents
Speculation London gold short-term stable money making skills? Where is it safe to fry London gold?
Opencv learning notes - cv:: mat class
A good habit that makes your programming ability soar
How can a shell script (.Sh file) not automatically close or flash back after execution?
From theory to practice, decipher Alibaba's internal MySQL optimization scheme in simple terms
Kubernetes best practice: graceful termination
Flink snapshot analysis: operators for locating large states and data skew
Use go to process millions of requests per minute
Installation and operation of libuv
VaR in PHP_ export、print_ r、var_ Differences in dump debugging
Sms service sms
Adjustment method of easynvr video platform equipment channel page display error
一文讲透植物内生菌研究怎么做 | 微生物专题
Use txvideoeditor to add watermark and export video card at 99%? No successful failed callback?
105. simple chat room 8: use socket to transfer pictures