distributedsystem/microservice/grpc

Reflection | gRPC

Reflection allows clients to dynamically discover and interact with gRPC services without needing precompiled .proto files.
This is particularly use for CLI tools line grpcurl and postman as well as dynamic clients.

How reflection works Internally

gRPC reflection is implemented as a special service called grpc.reflection.v1alpha.ServerReflection.
When enabled, the server registers metadata that clients can query.

Steps:

  1. A client sends a reflection request to grpc.reflection.v1alpha.ServerReflection / grpc.reflection.v1.ServerReflection.
  2. The server responds with a list of available services, methods, and message types.
  3. The client uses this metadata to construct and send requests dynamically.