current position：Home>Istio Troubleshooting: uneven grpc service load
Istio Troubleshooting: uneven grpc service load
This article excerpts from istio Learning notes
grpc call , The same client Your request always hits the same server Of pod, Cause uneven load .
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 .
- 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: ClusterIP
For more protocol specification methods, please refer to istio Best practices : Explicitly specify the protocol for the service
author[imroc],Please bring the original link to reprint, thank you.
The sidebar is recommended
- [Tencent cloud 618 countdown!] Promotion strategy of the promotion activities
- Simple and flexible permission design?
- Making daily menu applet with micro build low code
- 99% of the students can't write good code because of this problem!
- Istio practical skills: using prism to construct multi version test services
- Kubernetes practical technique: setting kernel parameters for pod
- A scheme for crawlers to collect public opinion data
- Essential key steps in the construction of e-commerce live broadcast source code
- How do websites and we media tap user needs? Deeply expose the secrets behind the keywords!
- From theory to practice, decipher Alibaba's internal MySQL optimization scheme in simple terms
guess what you like
Continuous testing | key to efficient testing in Devops Era
It's settled! Bank retail credit risk control just does it!
Encapsulate the method of converting a picture file object to Base64
The pod is evicted due to insufficient disk space of tke node
Post processing - deep camera deformation effects
Tencent released credit risk control results safely: it has helped banks lend more than 100 billion yuan
Interesting erasure code
Five minutes to develop your own code generator
How to make secruecrt more productive
About me, a 19 line programmer
- Kubernetes practical skill: entering container netns
- [programming navigation] the practical code summarized by foreign great God, learned in 30 seconds!
- Design and implementation of high performance go log library zap
- Ghost, a synonym for blog system
- Engage in audio and video development? Several things I have to say about SRT live broadcast protocol
- IOMMU (VII) -vfio and mdev
- [highlights] summary of award-winning activities of Tencent cloud documents
- The programmer's graduation project is still bald after a year
- How to solve the problem that MBR does not support partitions over 2T, and lossless transfer to GPT
- Another prize! Tencent Youtu won the leading scientific and technological achievement award of the 2021 digital Expo
- Use txvideoeditor to add watermark and export video card at 99%? No successful failed callback?
- Reset the password, and the automatic login of the website saved by chrome Google browser is lost. What is the underlying reason?
- [log service CLS] Tencent cloud log service CLS accesses CDN
- [live broadcast of celebrities] elastic observability workshop
- Smart Policing: how to use video intelligent analysis technology to help urban policing visual comprehensive supervision and command system
- SMS SMS
- WPF from zero to 1 tutorial details, suitable for novices on the road
- Dingding, Feishu, and enterprise wechat: different business approaches
- [2022 national tournament simulation] BigBen -- determinant, Du Jiao sieve
- How to do research on plant endophytes? Special topic on Microbiology
- Mlife forum | microbiome and data mining
- 105. simple chat room 8: use socket to transfer pictures
- Parse NC format file and GRB format file dependent package edu ucar. API learning of netcdfall
- Reading notes of returning to hometown
- Generate the NC file of 4-D air pressure and temperature, and then read the code (provide the code)
- Codereview tool chain for micro medicine
- Babbitt | metauniverse daily must read: 618 scores have been announced. How much contribution has the digital collection made behind this satisfactory answer
- On the value foam of digital copyright works from the controversial nature of "Meng Hua Lu"
- Use the open source tool k8tz to gracefully set the kubernetes pod time zone
- How does Argo family bucket make Devops easier?
- A hero's note stirred up a thousand waves across 10 countries, and the first-line big factories sent people here- Gwei 2022 Singapore
- MySQL foreign key impact
- Common special characters in JS and TS
- The text to voice function is available online. You can experience the services of professional broadcasters. We sincerely invite you to try it out
- Who said that "programmers are useless without computers? The big brother around me disagrees! It's true
- what the fuck! I'm flattered. He actually wrote down the answers to the redis interview questions that big companies often ask!
- Concept + formula (excluding parameter estimation)
- [database] final review (planning Edition)
- Troubleshooting and optimization of files that cannot be globally searched by ordinary users in easydss video platform customization project
- How can ffmpeg streaming to the server save video as a file through easydss video platform?