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?
✗ Incorrect
gRPC uses Protocol Buffers as its default serialization format for efficient and strongly typed communication.
Which HTTP version does gRPC use for transport?
✗ Incorrect
gRPC uses HTTP/2 to enable multiplexing, header compression, and low latency communication.
Which gRPC RPC type allows both client and server to send multiple messages?
✗ Incorrect
Bidirectional streaming RPC allows both client and server to send multiple messages independently.
What is a key advantage of using gRPC for internal microservices?
✗ Incorrect
gRPC enables efficient, strongly typed communication using Protocol Buffers and HTTP/2.
Which security feature is commonly used with gRPC for internal service communication?
✗ Incorrect
Mutual TLS is commonly used to authenticate and encrypt communication between internal gRPC services.
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.