gRPC interview questions — Medium
199 medium-level gRPC questions from our API Testing bank, each with the correct answer and an explanation of why it is correct.
What this covers
gRPC appears throughout API Testing interviews. At medium level, interviewers are typically checking that you have used it in practice: what you configured, what broke, and how you knew it worked. Work through these, then explain your answer out loud; the second part is what interviews actually test.
20 example questions
1. "Status returned when a call outlives its deadline" — in gRPC, this describes which of the following?
- A. DEADLINE_EXCEEDED.correct
- B. Protoc.
- C. Unary RPC.
- D. Channel.
Why: DEADLINE_EXCEEDED: Status returned when a call outlives its deadline.
2. "Both client and server send message streams concurrently" — in gRPC, this describes which of the following?
- A. Bidirectional streaming.correct
- B. .proto file.
- C. Metadata.
- D. Channel.
Why: bidirectional streaming: Both client and server send message streams concurrently.
3. "Client-side connection abstraction to a gRPC server" — in gRPC, this describes which of the following?
- A. .proto file.
- B. Channel.correct
- C. Metadata.
- D. Unary RPC.
Why: channel: Client-side connection abstraction to a gRPC server.
4. "Definition of gRPC services, methods, and message types" — in gRPC, this describes which of the following?
- A. Bidirectional streaming.
- B. DEADLINE_EXCEEDED.
- C. Unary RPC.
- D. .proto file.correct
Why: .proto file: Definition of gRPC services, methods, and message types.
5. "Key-value pairs sent with calls, similar to headers" — in gRPC, this describes which of the following?
- A. .proto file.
- B. Bidirectional streaming.
- C. DEADLINE_EXCEEDED.
- D. Metadata.correct
Why: metadata: Key-value pairs sent with calls, similar to headers.
6. "Middleware wrapping gRPC calls for auth or logging" — in gRPC, this describes which of the following?
- A. Interceptor.correct
- B. Bidirectional streaming.
- C. Metadata.
- D. Protoc.
Why: interceptor: Middleware wrapping gRPC calls for auth or logging.
7. "Single request producing a single response" — in gRPC, this describes which of the following?
- A. Channel.
- B. Protoc.
- C. Unary RPC.correct
- D. Metadata.
Why: unary RPC: Single request producing a single response.
8. Which of the following statements about gRPC is TRUE?
- A. GRPC uses XML as its default serialization format.
- B. Protobuf messages are larger and slower to parse than JSON.
- C. GRPC uses Protocol Buffers as its default interface definition and serialization format.correct
- D. GRPC supports only simple unary request/response calls.
Why: Proto files define services and messages compiled to client/server code.
9. Which statement correctly describes gRPC?
- A. Protobuf messages are larger and slower to parse than JSON.
- B. GRPC services can never be discovered without the original proto files.
- C. GRPC uses XML as its default serialization format.
- D. GRPC uses Protocol Buffers as its default interface definition and serialization format.correct
Why: Proto files define services and messages compiled to client/server code.
10. "Compiler generating code from proto definitions" — in gRPC, this describes which of the following?
- A. .proto file.
- B. Channel.
- C. Protoc.correct
- D. Unary RPC.
Why: protoc: Compiler generating code from proto definitions.
11. Identify the accurate statement about gRPC:
- A. GRPC reuses the standard HTTP status codes like 404 and 500 as its own.
- B. GRPC supports only simple unary request/response calls.
- C. GRPC runs exclusively over HTTP/1.0.
- D. GRPC supports unary, server-streaming, client-streaming, and bidirectional-streaming calls.correct
Why: Four call types cover request/response and continuous data flows.
12. In gRPC, which of the following is described as: "Middleware wrapping gRPC calls for auth or logging"?
- A. Bidirectional streaming.
- B. Channel.
- C. Metadata.
- D. Interceptor.correct
Why: interceptor: Middleware wrapping gRPC calls for auth or logging.
13. Which gRPC concept matches this description: "Middleware wrapping gRPC calls for auth or logging"?
- A. Metadata.
- B. Protoc.
- C. Bidirectional streaming.
- D. Interceptor.correct
Why: interceptor: Middleware wrapping gRPC calls for auth or logging.
14. In gRPC, which of the following is described as: "Definition of gRPC services, methods, and message types"?
- A. DEADLINE_EXCEEDED.
- B. Bidirectional streaming.
- C. Channel.
- D. .proto file.correct
Why: .proto file: Definition of gRPC services, methods, and message types.
15. Which gRPC concept matches this description: "Status returned when a call outlives its deadline"?
- A. Channel.
- B. DEADLINE_EXCEEDED.correct
- C. Protoc.
- D. Interceptor.
Why: DEADLINE_EXCEEDED: Status returned when a call outlives its deadline.
16. Which gRPC concept matches this description: "Client-side connection abstraction to a gRPC server"?
- A. Bidirectional streaming.
- B. DEADLINE_EXCEEDED.
- C. Metadata.
- D. Channel.correct
Why: channel: Client-side connection abstraction to a gRPC server.
17. In gRPC, which of the following is described as: "Both client and server send message streams concurrently"?
- A. DEADLINE_EXCEEDED.
- B. Bidirectional streaming.correct
- C. Metadata.
- D. Protoc.
Why: bidirectional streaming: Both client and server send message streams concurrently.
18. In gRPC, which of the following is described as: "Status returned when a call outlives its deadline"?
- A. Metadata.
- B. DEADLINE_EXCEEDED.correct
- C. Protoc.
- D. Unary RPC.
Why: DEADLINE_EXCEEDED: Status returned when a call outlives its deadline.
19. Which gRPC concept matches this description: "Definition of gRPC services, methods, and message types"?
- A. Channel.
- B. .proto file.correct
- C. Interceptor.
- D. Bidirectional streaming.
Why: .proto file: Definition of gRPC services, methods, and message types.
20. Which gRPC concept matches this description: "Both client and server send message streams concurrently"?
- A. Protoc.
- B. Bidirectional streaming.correct
- C. .proto file.
- D. DEADLINE_EXCEEDED.
Why: bidirectional streaming: Both client and server send message streams concurrently.