Challenge - 5 Problems
gRPC Proxying Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
gRPC Proxying Basic Configuration Output
What will be the output status code when NGINX proxies a gRPC request to a backend that is up and running with this configuration?
Nginx
server {
listen 50051 http2;
location / {
grpc_pass grpc://backend:50052;
}
}Attempts:
2 left
💡 Hint
Check if the grpc_pass directive points to a valid backend and if HTTP/2 is enabled.
✗ Incorrect
When NGINX proxies a gRPC request correctly to a healthy backend, it returns HTTP/2 200 OK status.
❓ Troubleshoot
intermediate2:00remaining
Identifying the Cause of gRPC 502 Bad Gateway
Given this NGINX snippet, what is the most likely cause of receiving a 502 Bad Gateway error when proxying gRPC requests?
Nginx
server {
listen 443 ssl http2;
ssl_certificate /etc/ssl/certs/server.crt;
ssl_certificate_key /etc/ssl/private/server.key;
location / {
grpc_pass grpc://127.0.0.1:50051;
}
}Attempts:
2 left
💡 Hint
502 Bad Gateway usually means NGINX cannot connect to the backend service.
✗ Incorrect
A 502 error indicates NGINX could not reach the backend gRPC server at 127.0.0.1:50051. The SSL config is for client connections, not backend connectivity.
❓ Configuration
advanced2:00remaining
Correct gRPC Timeout Configuration
Which NGINX configuration snippet correctly sets a 10-second timeout for gRPC proxying to avoid hanging requests?
Attempts:
2 left
💡 Hint
Use the directive specific to gRPC read timeout, not generic proxy timeouts.
✗ Incorrect
grpc_read_timeout sets the timeout for reading a response from the gRPC backend. proxy_read_timeout is for HTTP proxying, not gRPC.
🔀 Workflow
advanced3:00remaining
Order of Steps to Enable gRPC Proxying in NGINX
Arrange the steps in the correct order to enable gRPC proxying in NGINX for a new service.
Attempts:
2 left
💡 Hint
Think about starting backend first, then configuring proxy, then applying config, then testing.
✗ Incorrect
You must have the backend running before configuring NGINX to proxy it. Then reload NGINX and test the connection.
✅ Best Practice
expert3:00remaining
Best Practice for Handling gRPC Errors in NGINX Proxy
Which configuration snippet correctly handles gRPC backend errors by returning a custom error message to clients?
Attempts:
2 left
💡 Hint
gRPC error responses use HTTP/2 200 with grpc-status trailer (14 = UNAVAILABLE) for proper client handling.
✗ Incorrect
gRPC responses including errors use HTTP/2 200 with grpc-status trailer set to 14 (UNAVAILABLE). Returning 503 or other 5xx makes it an HTTP transport error, not a proper gRPC status.