0
0
HLDsystem_design~5 mins

gRPC for internal services in HLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is gRPC and why is it used for internal services?
gRPC is a fast, open-source remote procedure call (RPC) framework that uses HTTP/2 for transport. It is used for internal services because it supports efficient communication, strong typing with Protocol Buffers, and bi-directional streaming, making it ideal for microservices.
Click to reveal answer
intermediate
How does gRPC use Protocol Buffers in service communication?
gRPC uses Protocol Buffers as its interface definition language and message format. This means service methods and message structures are defined in .proto files, which are then compiled to generate code for client and server, ensuring efficient and strongly typed communication.
Click to reveal answer
intermediate
What are the benefits of HTTP/2 in gRPC for internal services?
HTTP/2 provides multiplexing (multiple requests over one connection), header compression, and server push. These features reduce latency and improve throughput, making gRPC communication between internal services faster and more efficient.
Click to reveal answer
intermediate
Explain the difference between unary and streaming RPC in gRPC.
Unary RPC is a simple request-response where client sends one request and gets one response. Streaming RPC allows sending multiple messages: client streaming (client sends many, server responds once), server streaming (server sends many, client receives many), or bidirectional streaming (both send many).
Click to reveal answer
advanced
What are common security practices when using gRPC for internal services?
Common practices include using TLS encryption for transport security, mutual TLS for authentication between services, and enforcing authorization policies. Since gRPC uses HTTP/2, it supports strong encryption and identity verification to protect internal communication.
Click to reveal answer
What serialization format does gRPC primarily use?
AYAML
BJSON
CXML
DProtocol Buffers
Which HTTP version does gRPC use for transport?
AHTTP/1.1
BHTTP/1.0
CHTTP/2
DHTTP/3
Which gRPC RPC type allows both client and server to send multiple messages?
ABidirectional streaming RPC
BClient streaming RPC
CUnary RPC
DServer streaming RPC
What is a key advantage of using gRPC for internal microservices?
AUses slow text-based protocols
BEnables efficient, strongly typed communication
CSupports only REST APIs
DDoes not support streaming
Which security feature is commonly used with gRPC for internal service communication?
AMutual TLS authentication
BPlain HTTP
CNo encryption
DBasic authentication only
Describe how gRPC uses Protocol Buffers and HTTP/2 to improve internal service communication.
Think about how data is structured and sent between services.
You got /4 concepts.
    Explain the different types of RPC calls supported by gRPC and when you might use each.
    Consider the direction and number of messages exchanged.
    You got /4 concepts.