SlideShare ist ein Scribd-Unternehmen logo
1 von 11
gRPC Load Balancing on
Kubernetes without Tears
Orig Author: William Morgan (Buoyant)
Slide by : Soohan Ahn
Orignial blog post link
• https://kubernetes.io/blog/2018/11/07/grpc-load-
balancing-on-kubernetes-without-tears/
Why does gRPC need special load
balancing?
• gRPC is built on HTTP/2
• HTTP/2 is designed to have a single long-lived TCP
connection
Why does gRPC need special load
balancing?
• gRPC is built on HTTP/2
• HTTP/2 is designed to have a single long-lived TCP
connection
• Reduces the overhead of connection management
• Connection balancing doesn't work well
Why does gRPC need special load
balancing?
• Connection balancing doesn't work well
• Once the connection is established, there’s no more balancing to be
done.
• All requests will get pinned to a single destination pod.
On http/1.1?
• In contrast to HTTP/2, HTTP/1.1 cannot multiplex requests.
• Only one HTTP request can be active at a time per TCP
connection.
Each blue box : Connection
Each blue box : Connection
On http/1.1?
• Additionally, long-lived HTTP/1.1 connections typically expire
after some time, and are torn down by the client (or server).
Connection may expired.
How do we do on gRPC?
• Connection balancing -> Request balancing
How do we do on gRPC?
• We need to make decisions at L5/L7 rather than L3/L4,
• Need to understand the protocol sent over the TCP connections.
On Kubernetes?
• Use https://godoc.org/google.golang.org/grpc/balancer.
• Too complex on the dynamic env.
• Headless services
• On outdated gRPC clients, is not possible to maintain load balancing
pool automatically.
• Use a lightweight proxy.
• Such as Linkerd.
• https://linkerd.io/
Linkerd
• A CNCF-hosted service mesh for Kubernetes.
• Also functions as a service sidecar.

Weitere ähnliche Inhalte

Was ist angesagt?

Continuous delivery the nuts and bolts
Continuous delivery the nuts and boltsContinuous delivery the nuts and bolts
Continuous delivery the nuts and bolts
OlympicSoftware
 
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
End-to-End Reactive Data Access Using R2DBC with RSocket and ProteusEnd-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
VMware Tanzu
 

Was ist angesagt? (19)

Continuous delivery the nuts and bolts
Continuous delivery the nuts and boltsContinuous delivery the nuts and bolts
Continuous delivery the nuts and bolts
 
Version control 101
Version control 101Version control 101
Version control 101
 
Comparative Performance of XSLT Processors in Apache Cocoon
Comparative Performance of XSLT Processors in Apache CocoonComparative Performance of XSLT Processors in Apache Cocoon
Comparative Performance of XSLT Processors in Apache Cocoon
 
Cassovary
CassovaryCassovary
Cassovary
 
Migrating our micro services from Java to Kotlin (Code.Talks 2018)
Migrating our micro services from Java to Kotlin (Code.Talks 2018)Migrating our micro services from Java to Kotlin (Code.Talks 2018)
Migrating our micro services from Java to Kotlin (Code.Talks 2018)
 
Http/2
Http/2Http/2
Http/2
 
Jenkins : Pipeline As Code
Jenkins : Pipeline As CodeJenkins : Pipeline As Code
Jenkins : Pipeline As Code
 
SaltConf2015: SaltStack at Scale Automating Your Automation
SaltConf2015: SaltStack at Scale Automating Your AutomationSaltConf2015: SaltStack at Scale Automating Your Automation
SaltConf2015: SaltStack at Scale Automating Your Automation
 
IIS request process
IIS request processIIS request process
IIS request process
 
Koha 3.2 Status
Koha 3.2 StatusKoha 3.2 Status
Koha 3.2 Status
 
ASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and ToolingASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and Tooling
 
Grokking TechTalk #24: Kafka's principles and protocols
Grokking TechTalk #24: Kafka's principles and protocolsGrokking TechTalk #24: Kafka's principles and protocols
Grokking TechTalk #24: Kafka's principles and protocols
 
NGINX_conf_2016_talk
NGINX_conf_2016_talkNGINX_conf_2016_talk
NGINX_conf_2016_talk
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-Side
 
美团点评技术沙龙08 - 分布式监控系统实践
美团点评技术沙龙08 - 分布式监控系统实践美团点评技术沙龙08 - 分布式监控系统实践
美团点评技术沙龙08 - 分布式监控系统实践
 
Flowable What´s coming next?
Flowable What´s coming next?Flowable What´s coming next?
Flowable What´s coming next?
 
OpenJDK & Graalvm
OpenJDK & GraalvmOpenJDK & Graalvm
OpenJDK & Graalvm
 
PubSub++ - Atmosphere 2015
PubSub++ - Atmosphere 2015PubSub++ - Atmosphere 2015
PubSub++ - Atmosphere 2015
 
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
End-to-End Reactive Data Access Using R2DBC with RSocket and ProteusEnd-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus
 

Ähnlich wie Grpc load balancing

Article http over transport protocols
Article   http over transport protocolsArticle   http over transport protocols
Article http over transport protocols
Icaro Camelo
 

Ähnlich wie Grpc load balancing (20)

Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1
 
NGINX: HTTP/2 Server Push and gRPC
NGINX: HTTP/2 Server Push and gRPCNGINX: HTTP/2 Server Push and gRPC
NGINX: HTTP/2 Server Push and gRPC
 
Article http over transport protocols
Article   http over transport protocolsArticle   http over transport protocols
Article http over transport protocols
 
Architecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres ClusterArchitecture for building scalable and highly available Postgres Cluster
Architecture for building scalable and highly available Postgres Cluster
 
NGINX: HTTP/2 Server Push and gRPC – EMEA
NGINX: HTTP/2 Server Push and gRPC – EMEANGINX: HTTP/2 Server Push and gRPC – EMEA
NGINX: HTTP/2 Server Push and gRPC – EMEA
 
SPDY
SPDYSPDY
SPDY
 
Running a distributed system across kubernetes clusters - Kubecon North Ameri...
Running a distributed system across kubernetes clusters - Kubecon North Ameri...Running a distributed system across kubernetes clusters - Kubecon North Ameri...
Running a distributed system across kubernetes clusters - Kubecon North Ameri...
 
Load Balancing 101
Load Balancing 101Load Balancing 101
Load Balancing 101
 
Building API Using GRPC And Scala
Building API Using GRPC And ScalaBuilding API Using GRPC And Scala
Building API Using GRPC And Scala
 
Introduction to gRPC (Application) Presentation
Introduction to gRPC (Application) PresentationIntroduction to gRPC (Application) Presentation
Introduction to gRPC (Application) Presentation
 
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
 
Tomcatx performance-tuning
Tomcatx performance-tuningTomcatx performance-tuning
Tomcatx performance-tuning
 
SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0
 
Design choices of golang for high scalability
Design choices of golang for high scalabilityDesign choices of golang for high scalability
Design choices of golang for high scalability
 
Introduction to HTTP2
Introduction to HTTP2Introduction to HTTP2
Introduction to HTTP2
 
Http/2
Http/2Http/2
Http/2
 
Microservices summit talk 1/31
Microservices summit talk   1/31Microservices summit talk   1/31
Microservices summit talk 1/31
 
Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Grpc load balancing

  • 1. gRPC Load Balancing on Kubernetes without Tears Orig Author: William Morgan (Buoyant) Slide by : Soohan Ahn
  • 2. Orignial blog post link • https://kubernetes.io/blog/2018/11/07/grpc-load- balancing-on-kubernetes-without-tears/
  • 3. Why does gRPC need special load balancing? • gRPC is built on HTTP/2 • HTTP/2 is designed to have a single long-lived TCP connection
  • 4. Why does gRPC need special load balancing? • gRPC is built on HTTP/2 • HTTP/2 is designed to have a single long-lived TCP connection • Reduces the overhead of connection management • Connection balancing doesn't work well
  • 5. Why does gRPC need special load balancing? • Connection balancing doesn't work well • Once the connection is established, there’s no more balancing to be done. • All requests will get pinned to a single destination pod.
  • 6. On http/1.1? • In contrast to HTTP/2, HTTP/1.1 cannot multiplex requests. • Only one HTTP request can be active at a time per TCP connection. Each blue box : Connection
  • 7. Each blue box : Connection On http/1.1? • Additionally, long-lived HTTP/1.1 connections typically expire after some time, and are torn down by the client (or server). Connection may expired.
  • 8. How do we do on gRPC? • Connection balancing -> Request balancing
  • 9. How do we do on gRPC? • We need to make decisions at L5/L7 rather than L3/L4, • Need to understand the protocol sent over the TCP connections.
  • 10. On Kubernetes? • Use https://godoc.org/google.golang.org/grpc/balancer. • Too complex on the dynamic env. • Headless services • On outdated gRPC clients, is not possible to maintain load balancing pool automatically. • Use a lightweight proxy. • Such as Linkerd. • https://linkerd.io/
  • 11. Linkerd • A CNCF-hosted service mesh for Kubernetes. • Also functions as a service sidecar.