Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

Share

gRPC - Fastest Data Transfer Protocol

Download to read offline

gRPC is designed to be fast and high performance. It's basically can overcome performance issues caused by REST communications between different dependent microservices.

gRPC supports Binary data transfer in the form of Protocol Buffers which makes it extremely efficient in the Microservice cloud environment.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

gRPC - Fastest Data Transfer Protocol

  1. 1. gRPC - High-performance - Open source - Universal RPC framework
  2. 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. 3. Features • Based on HTTP/2 protocol • Protocol Buffer message • Persistent connection • No serialization required • Bi-directional streaming • Point to point data stream
  4. 4. Architecture
  5. 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. 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. 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. 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. 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. 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. 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. 12. Thank you! • https://grpc.io/ • https://en.wikipedia.org/wiki/GRPC • https://en.wikipedia.org/wiki/Protocol_Buffers

gRPC is designed to be fast and high performance. It's basically can overcome performance issues caused by REST communications between different dependent microservices. gRPC supports Binary data transfer in the form of Protocol Buffers which makes it extremely efficient in the Microservice cloud environment.

Views

Total views

147

On Slideshare

0

From embeds

0

Number of embeds

0

Actions

Downloads

2

Shares

0

Comments

0

Likes

0

×