当前位置:网站首页>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
边栏推荐
- IOMMU (VII) -vfio and mdev
- What should music website SEO do?
- Pipeline post instruction
- How to calculate the bandwidth of video transmission? How much bandwidth is required to transmit 4K video?
- 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
- Kubernetes practical skills: use cert manager to issue free certificates for DNSPod domain names
- 炒伦敦金短线稳定赚钱技巧?在哪里炒伦敦金安全靠谱?
- Data stack technology sharing: open source · data stack - extend flinksql to realize the join of flow and dimension tables
- [2021 techo youth dry goods sorting post, there is always one you are interested in]
- [log service CLS] Tencent cloud log service CLS accesses CDN
猜你喜欢

《回归故里》阅读笔记
[mysql_16] variables, process control and cursors
Cloud native database: the outlet of the database, you can also take off

Installation and operation of libuv
Deep parsing and implementation of redis pub/sub publish subscribe mode message queue

WPF从零到1教程详解,适合新手上路

【2022国赛模拟】摆(bigben)——行列式、杜教筛

一纸英雄帖,激起千层浪,横跨10国,一线大厂都派人来了!-GWEI 2022-新加坡

使用开源工具 k8tz 优雅设置 Kubernetes Pod 时区

Dingding, Feishu, and enterprise wechat: different business approaches
随机推荐
How can I open an account with new bonds? Is it safe
Pinduoduo press the user accelerator key
Continuous testing | test process improvement: practice continuous testing within iterations in coding
National standard platform easygbs administrator assigns roles to sub users and troubleshooting of invalid channels
On the value foam of digital copyright works from the controversial nature of "Meng Hua Lu"
Design and implementation of high performance go log library zap
Pipeline post instruction
How to apply for new bonds is it safe to open an account
Mlife forum | microbiome and data mining
Jupyter notebook service installation and startup
How to open a new bond? Is it safe to open an account
Opencv learning notes - cv:: mat class
Opencv learning notes - Discrete Fourier transform
Continuous testing | making testing more free: practicing automated execution of use cases in coding
Interesting erasure code
Opencv learning notes - matrix normalization normalize() function
Is it safe to apply for new bonds to open an account
Tsingsee green rhino video "cloud side end" +ai intelligent security system is integrated into the mainstream development trend
【数据挖掘】期末复习(样卷题目+少量知识点)
【概率论期末抱佛脚】概念+公式(不含参数估计)