Recall & Review
beginner
What is gRPC and why is it used for internal communication in microservices?
gRPC is a fast, open-source remote procedure call (RPC) framework that uses HTTP/2 for transport. It is used for internal communication because it supports efficient, low-latency, and strongly-typed communication between microservices.
Click to reveal answer
intermediate
How does gRPC use Protocol Buffers in communication?
gRPC uses Protocol Buffers (protobuf) as its interface definition language and message format. Protobuf defines the service methods and message structures, which are then compiled into code for different languages, enabling efficient serialization and deserialization.
Click to reveal answer
intermediate
What are the benefits of using HTTP/2 in gRPC?
HTTP/2 allows multiplexing multiple requests over a single connection, reduces latency with header compression, and supports bidirectional streaming. This makes gRPC communication faster and more efficient compared to HTTP/1.1.
Click to reveal answer
intermediate
Explain the difference between unary and streaming RPC in gRPC.
Unary RPC is a simple request-response where the client sends one request and gets one response. Streaming RPC allows sending multiple messages: client streaming sends many requests, server streaming sends many responses, and bidirectional streaming allows both sides to send multiple messages.
Click to reveal answer
advanced
Why is gRPC considered suitable for internal microservice communication but less common for public APIs?
gRPC is efficient and strongly typed, ideal for internal services where performance and strict contracts matter. However, it requires HTTP/2 and protobuf clients, which may limit browser support and ease of use for public APIs compared to REST/JSON.
Click to reveal answer
What transport protocol does gRPC use by default?
✗ Incorrect
gRPC uses HTTP/2 as its transport protocol to enable multiplexing and efficient communication.
Which serialization format is primarily used by gRPC?
✗ Incorrect
gRPC uses Protocol Buffers for defining service contracts and serializing messages.
Which gRPC communication type allows both client and server to send multiple messages independently?
✗ Incorrect
Bidirectional streaming RPC allows both client and server to send multiple messages independently.
Why is gRPC preferred for internal microservice communication?
✗ Incorrect
gRPC supports low latency communication and strong typing, which are important for internal microservices.
Which of the following is NOT a feature of gRPC?
✗ Incorrect
gRPC uses HTTP/2, not HTTP/1.1, for transport.
Describe how gRPC works for internal communication between microservices.
Think about the transport, message format, and communication patterns.
You got /5 concepts.
Explain the advantages and limitations of using gRPC for internal microservice communication.
Consider both technical benefits and practical constraints.
You got /3 concepts.