Recall & Review
beginner
What is gRPC proxying in the context of NGINX?
gRPC proxying is when NGINX acts as a middleman that forwards gRPC requests from clients to backend gRPC servers, allowing load balancing, security, and routing.
Click to reveal answer
beginner
Which NGINX directive enables gRPC proxying?
The directive
grpc_pass is used inside a location block to forward gRPC requests to a backend gRPC server.Click to reveal answer
beginner
How do you configure NGINX to listen for gRPC traffic on port 50051?
Use
listen 50051 http2; in the server block because gRPC requires HTTP/2 protocol.Click to reveal answer
intermediate
Why must NGINX use HTTP/2 when proxying gRPC?
Because gRPC uses HTTP/2 for its communication, NGINX must support HTTP/2 to correctly forward gRPC requests and responses.
Click to reveal answer
intermediate
What is the minimal NGINX location block to proxy gRPC requests to backend at grpc://localhost:50052?
location / {
grpc_pass grpc://localhost:50052;
}This forwards all gRPC requests to the backend server running on port 50052.Click to reveal answer
Which protocol must NGINX use to proxy gRPC traffic?
✗ Incorrect
gRPC requires HTTP/2 protocol for communication, so NGINX must use HTTP/2 to proxy gRPC traffic.
What directive in NGINX config forwards gRPC requests to a backend server?
✗ Incorrect
The
grpc_pass directive is specifically designed to forward gRPC requests.How do you enable HTTP/2 on port 443 in NGINX for gRPC proxying?
✗ Incorrect
To support gRPC over TLS, NGINX must listen with HTTP/2 and SSL enabled using
listen 443 http2 ssl;.What happens if NGINX listens without HTTP/2 for gRPC traffic?
✗ Incorrect
gRPC requires HTTP/2; without it, requests will fail because the protocol is not supported.
Which of these is a valid gRPC backend URL in NGINX config?
✗ Incorrect
The
grpc:// scheme is used to specify a gRPC backend in NGINX.Explain how to configure NGINX to proxy gRPC requests including the necessary directives and protocol requirements.
Think about how NGINX handles HTTP/2 and the grpc_pass directive.
You got /4 concepts.
Describe why HTTP/2 is essential for gRPC proxying and what happens if it is not enabled in NGINX.
Consider the protocol requirements of gRPC.
You got /3 concepts.