SlideShare uma empresa Scribd logo
1 de 12
gRPC
- High-performance
- Open source
- Universal RPC framework
What is gRPC?
gRPC is an open source remote procedure call
system initially developed at Google in 2015. based
on HTTP/2 protocol using Protocol Buffers
as interface description language.
In gRPC, client application can directly call a method
on a server application on a different machine as if
it were a local object, making it easier for you to
communicate between microservices.
Features
• Based on HTTP/2 protocol
• Protocol Buffer message
• Persistent connection
• No serialization required
• Bi-directional streaming
• Point to point data stream
Architecture
Sample
Protocol Buffer Interface
message EntityInfoRequest {
string entity_id = 1;
}
message EntityInfoResponse {
string id = 1;
string field_1 = 2;
string field_2 = 3;
string field_3 = 4;
bool field_4 = 5;
string created_on = 6;
}
service EntityService {
rpc getEntityInfo(EntityInfoRequest) returns (EntityInfoResponse) {}
}
Key Benefits
• gRPC based on HTTP/2. which is a Binary
protocol, but HTTP 1.1 is Textual. Binary
protocol is much efficient to parse and its
safe.
• gRPC uses Protobuf messages which is
compressed binary encoded structured data.
• gRPC is multiplexing in nature so it
overcomes the Head-of-Line Blocking
problem of HTTP1.1.
• gRPC uses header compression to reduce
overhead.
• gRPC also supports Duplex Streaming.
Primary
Use Cases
• In microservices based application infrastructure
services/servers can talk to each other using gRPC
over persistent connection to reduce overhead of
multiple TCP handshaking.
• If application required duplex streaming with high
data volume gRPC can help due to it’s binary
encoded compress protocol buffer messaging.
REST
&
gRPC
REST gRPC
Based on HTTP/1.1 Based on HTTP/2
Supports XML, JSON based
textual data format
Supports Protocol buffer based
binary data format
No duplex streaming supported Duplex streaming supported
No RPC interfaces available Based on RPC interface
Handshake for every request Persistent connection to reduce
processing time
Websockets
&
gRPC
Websockets gRPC
Based on HTTP/1.1 Based on HTTP/2
Supports XML, JSON based
textual data format
Supports Protocol buffer based
binary data format
No duplex streaming supported Duplex streaming supported
No RPC interfaces available Based on RPC interface
Pub/Sub based data streaming Point to Point data streaming
Benchmark
Data Websockets gRPC
1k messages
(1.2KB)
80ms 10ms
10k messages
(1.2KB)
125ms 41ms
100k messages
(1.2KB)
901ms 210ms
1k messages
(5KB)
146ms 56ms
10k messages
(5KB)
228ms 94ms
100k messages
(5KB)
1967ms 259ms
Conclusion
In microservices based environment related
communication gRPC would be one of the best
probable candidate among REST & Websockets &
gRPC due to it’s
• Binary data format (Protocol Buffer)
• HTTP/2 support
• Persistent connection
• Duplex streaming
Thank you!
• https://grpc.io/
• https://en.wikipedia.org/wiki/GRPC
• https://en.wikipedia.org/wiki/Protocol_Buffers

Mais conteúdo relacionado

Mais procurados

Getting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationGetting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationChristian Götz
 
Hybrid Application Development documentation report (MCA Project)
Hybrid Application Development documentation report (MCA Project)Hybrid Application Development documentation report (MCA Project)
Hybrid Application Development documentation report (MCA Project)vetri pandi
 
Connection load balancing with mikrotik [workshop]
Connection load balancing with mikrotik [workshop]Connection load balancing with mikrotik [workshop]
Connection load balancing with mikrotik [workshop]Achmad Mardiansyah
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingMichelle Holley
 
MikroTik Security
MikroTik SecurityMikroTik Security
MikroTik SecurityRofiq Fauzi
 
Socket programming
Socket programmingSocket programming
Socket programmingUjjwal Kumar
 
Network Monitoring with The Dude and Whatsapp
Network Monitoring with The Dude and WhatsappNetwork Monitoring with The Dude and Whatsapp
Network Monitoring with The Dude and WhatsappGLC Networks
 
Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Weaveworks
 
Mikrotik IP Settings For Performance and Security
Mikrotik IP Settings For Performance and SecurityMikrotik IP Settings For Performance and Security
Mikrotik IP Settings For Performance and SecurityGLC Networks
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDKKernel TLV
 
7 hands on
7 hands on7 hands on
7 hands onvideos
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_mapslcplcp1
 
Cilium - Container Networking with BPF & XDP
Cilium - Container Networking with BPF & XDPCilium - Container Networking with BPF & XDP
Cilium - Container Networking with BPF & XDPThomas Graf
 
ISP load balancing with mikrotik nth
ISP load balancing with mikrotik nthISP load balancing with mikrotik nth
ISP load balancing with mikrotik nthAchmad Mardiansyah
 
Dhcp presentation 01
Dhcp presentation 01Dhcp presentation 01
Dhcp presentation 01maverick4489
 

Mais procurados (20)

Getting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationGetting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentation
 
Hybrid Application Development documentation report (MCA Project)
Hybrid Application Development documentation report (MCA Project)Hybrid Application Development documentation report (MCA Project)
Hybrid Application Development documentation report (MCA Project)
 
Connection load balancing with mikrotik [workshop]
Connection load balancing with mikrotik [workshop]Connection load balancing with mikrotik [workshop]
Connection load balancing with mikrotik [workshop]
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
MikroTik Security
MikroTik SecurityMikroTik Security
MikroTik Security
 
BGP on mikrotik
BGP on mikrotikBGP on mikrotik
BGP on mikrotik
 
Socket programming
Socket programmingSocket programming
Socket programming
 
EtherChannel Configuration
EtherChannel ConfigurationEtherChannel Configuration
EtherChannel Configuration
 
Network Monitoring with The Dude and Whatsapp
Network Monitoring with The Dude and WhatsappNetwork Monitoring with The Dude and Whatsapp
Network Monitoring with The Dude and Whatsapp
 
Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)
 
Mikrotik IP Settings For Performance and Security
Mikrotik IP Settings For Performance and SecurityMikrotik IP Settings For Performance and Security
Mikrotik IP Settings For Performance and Security
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
7 hands on
7 hands on7 hands on
7 hands on
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
 
Cilium - Container Networking with BPF & XDP
Cilium - Container Networking with BPF & XDPCilium - Container Networking with BPF & XDP
Cilium - Container Networking with BPF & XDP
 
ISP load balancing with mikrotik nth
ISP load balancing with mikrotik nthISP load balancing with mikrotik nth
ISP load balancing with mikrotik nth
 
Port tcp
Port tcpPort tcp
Port tcp
 
Mikrotik firewall filter
Mikrotik firewall filterMikrotik firewall filter
Mikrotik firewall filter
 
Dhcp presentation 01
Dhcp presentation 01Dhcp presentation 01
Dhcp presentation 01
 

Semelhante a gRPC - Fastest Data Transfer Protocol

gRPC Design and Implementation
gRPC Design and ImplementationgRPC Design and Implementation
gRPC Design and ImplementationVarun Talwar
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stackLuca Mattia Ferrari
 
Building API Using GRPC And Scala
Building API Using GRPC And ScalaBuilding API Using GRPC And Scala
Building API Using GRPC And ScalaKnoldus Inc.
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleAmbassador Labs
 
Modern webservices using gRPC and Protocol Buffers in Golang
Modern webservices using gRPC and Protocol Buffers in GolangModern webservices using gRPC and Protocol Buffers in Golang
Modern webservices using gRPC and Protocol Buffers in GolangOmidHojabri1
 
Introduction to gRPC (Application) Presentation
Introduction to gRPC (Application) PresentationIntroduction to gRPC (Application) Presentation
Introduction to gRPC (Application) PresentationKnoldus Inc.
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC! REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC! QAware GmbH
 
Microservices Communication Patterns with gRPC
Microservices Communication Patterns with gRPCMicroservices Communication Patterns with gRPC
Microservices Communication Patterns with gRPCWSO2
 
What is gRPC introduction gRPC Explained
What is gRPC introduction gRPC ExplainedWhat is gRPC introduction gRPC Explained
What is gRPC introduction gRPC Explainedjeetendra mandal
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!QAware GmbH
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsTim Burks
 
What you need to know about .NET Core 3.0 and beyond
What you need to know about .NET Core 3.0 and beyondWhat you need to know about .NET Core 3.0 and beyond
What you need to know about .NET Core 3.0 and beyondJon Galloway
 

Semelhante a gRPC - Fastest Data Transfer Protocol (20)

gRPC Design and Implementation
gRPC Design and ImplementationgRPC Design and Implementation
gRPC Design and Implementation
 
GRPC.pptx
GRPC.pptxGRPC.pptx
GRPC.pptx
 
gRPC services testing
gRPC services testinggRPC services testing
gRPC services testing
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stack
 
gRPC
gRPCgRPC
gRPC
 
Building API Using GRPC And Scala
Building API Using GRPC And ScalaBuilding API Using GRPC And Scala
Building API Using GRPC And Scala
 
Apa itu gRPC_.pptx
Apa itu gRPC_.pptxApa itu gRPC_.pptx
Apa itu gRPC_.pptx
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Modern webservices using gRPC and Protocol Buffers in Golang
Modern webservices using gRPC and Protocol Buffers in GolangModern webservices using gRPC and Protocol Buffers in Golang
Modern webservices using gRPC and Protocol Buffers in Golang
 
Building microservices with grpc
Building microservices with grpcBuilding microservices with grpc
Building microservices with grpc
 
Introduction to gRPC (Application) Presentation
Introduction to gRPC (Application) PresentationIntroduction to gRPC (Application) Presentation
Introduction to gRPC (Application) Presentation
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC! REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!
 
Microservices Communication Patterns with gRPC
Microservices Communication Patterns with gRPCMicroservices Communication Patterns with gRPC
Microservices Communication Patterns with gRPC
 
What is gRPC introduction gRPC Explained
What is gRPC introduction gRPC ExplainedWhat is gRPC introduction gRPC Explained
What is gRPC introduction gRPC Explained
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
 
What you need to know about .NET Core 3.0 and beyond
What you need to know about .NET Core 3.0 and beyondWhat you need to know about .NET Core 3.0 and beyond
What you need to know about .NET Core 3.0 and beyond
 
gRPC with java
gRPC with javagRPC with java
gRPC with java
 
APIs at the Edge
APIs at the EdgeAPIs at the Edge
APIs at the Edge
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

gRPC - Fastest Data Transfer Protocol

  • 1. gRPC - High-performance - Open source - Universal RPC framework
  • 2. What is gRPC? gRPC is an open source remote procedure call system initially developed at Google in 2015. based on HTTP/2 protocol using Protocol Buffers as interface description language. In gRPC, client application can directly call a method on a server application on a different machine as if it were a local object, making it easier for you to communicate between microservices.
  • 3. Features • Based on HTTP/2 protocol • Protocol Buffer message • Persistent connection • No serialization required • Bi-directional streaming • Point to point data stream
  • 5. Sample Protocol Buffer Interface message EntityInfoRequest { string entity_id = 1; } message EntityInfoResponse { string id = 1; string field_1 = 2; string field_2 = 3; string field_3 = 4; bool field_4 = 5; string created_on = 6; } service EntityService { rpc getEntityInfo(EntityInfoRequest) returns (EntityInfoResponse) {} }
  • 6. Key Benefits • gRPC based on HTTP/2. which is a Binary protocol, but HTTP 1.1 is Textual. Binary protocol is much efficient to parse and its safe. • gRPC uses Protobuf messages which is compressed binary encoded structured data. • gRPC is multiplexing in nature so it overcomes the Head-of-Line Blocking problem of HTTP1.1. • gRPC uses header compression to reduce overhead. • gRPC also supports Duplex Streaming.
  • 7. Primary Use Cases • In microservices based application infrastructure services/servers can talk to each other using gRPC over persistent connection to reduce overhead of multiple TCP handshaking. • If application required duplex streaming with high data volume gRPC can help due to it’s binary encoded compress protocol buffer messaging.
  • 8. REST & gRPC REST gRPC Based on HTTP/1.1 Based on HTTP/2 Supports XML, JSON based textual data format Supports Protocol buffer based binary data format No duplex streaming supported Duplex streaming supported No RPC interfaces available Based on RPC interface Handshake for every request Persistent connection to reduce processing time
  • 9. Websockets & gRPC Websockets gRPC Based on HTTP/1.1 Based on HTTP/2 Supports XML, JSON based textual data format Supports Protocol buffer based binary data format No duplex streaming supported Duplex streaming supported No RPC interfaces available Based on RPC interface Pub/Sub based data streaming Point to Point data streaming
  • 10. Benchmark Data Websockets gRPC 1k messages (1.2KB) 80ms 10ms 10k messages (1.2KB) 125ms 41ms 100k messages (1.2KB) 901ms 210ms 1k messages (5KB) 146ms 56ms 10k messages (5KB) 228ms 94ms 100k messages (5KB) 1967ms 259ms
  • 11. Conclusion In microservices based environment related communication gRPC would be one of the best probable candidate among REST & Websockets & gRPC due to it’s • Binary data format (Protocol Buffer) • HTTP/2 support • Persistent connection • Duplex streaming
  • 12. Thank you! • https://grpc.io/ • https://en.wikipedia.org/wiki/GRPC • https://en.wikipedia.org/wiki/Protocol_Buffers