> ## Content Index
> Fetch the complete content index at: https://datajutsu.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# The gRPC Reflection Service Is a Two Way Stream (and the Schema It Serves Is Opaque Bytes)
- URL: https://datajutsu.com/grpc-reflection-service/
- Published: 2026-10-24T06:29:15.000Z
- Updated: 2026-10-24T06:29:15.000Z
- Author: Data Jutsu

I stood up a real gRPC server with a small demo service on it and the reflection service registered alongside, then talked to it with a raw HTTP/2 client that carried no schema at all. The reflection service is not a request, then a response, pair. It is a single bidirectional stream: you open one stream, send as many questions as you want down it, and the answers come back on that same stream, in the order you asked. I checked that against the live server, and the one RPC it exposes is declared as a stream in both directions, both the request and the response flags set. Three questions went down one stream and three answers came back on that same stream, in order, and the stream stayed open the whole time.

The questions are small. The request message is a host field and a oneof with five members: find a file by its name, find the file that contains a given symbol, find the file that contains a given extension, list the extension numbers of a type, and list the services. The oneof is the discriminator; the server looks at which member is set and answers accordingly. The smallest question is list services, and the whole encoded request, before any gRPC framing, is two bytes. I built that frame by hand, field seven with an empty value, and it came back with the answer.

Here is the part that is not obvious. The answer to the symbol and the file questions is a file descriptor response, and its one field is a repeated bytes. The serialized descriptor comes back as opaque bytes. The reflection schema deliberately does not include the descriptor schema; the comment in the file says it avoids the dependency because the descriptor file uses proto2 only features, so the descriptor is carried as raw bytes instead. The consequence is that the response schema tells you the descriptor is in there, but it will not tell you what is in the descriptor. To read it you need a second schema, the one that defines the file descriptor, and that is the recursive part, because the whole reason the service exists is to hand you schema files, and reading its own reply needs a schema file of exactly that kind.

I pulled the blob out of the reply and it was byte for byte identical to what the real protoc 25.3 compiled from the same source file, one hundred and eighty four bytes, compared with a straight file comparison. Parsing it by hand, the top level is the file name, the package, the two messages with their fields, and the service with its methods. The methods carry their input and output types fully qualified, the package in front, and the streaming flags sit right there, the bidirectional one marked on both sides. So the blob is the whole API footprint: every service name, every method, the field numbers, the types, and which of the calls stream. List services confirmed the shape from the other side, returning the fully qualified names, the reflection service itself included, because it is registered on the server just like everything else.

The failures stay on the stream too. I asked for a symbol that does not exist and the answer came back on that same stream, in the same position, as an error response with the code for not found and a message naming the symbol. Nothing about the stream changed; the error is just another reply in the sequence. That is where the tool touches it. The decode tab takes the hex of a gRPC frame, strips the five byte header, and decodes the rest against a schema. Run it on the reflection reply and it decodes fine, the host, the echoed original request, the file descriptor response, but the descriptor field comes out as a base64 string. That is the opaque bytes showing up in the tool: the first pass hands you the envelope, and the schema inside is still a blob you have to feed to a second decode with the descriptor schema. The framing it is riding on is the same as the [real trace post](https://datajutsu.com/decode-a-real-grpc-trace/), and the headers around it are in the [gRPC metadata post](https://datajutsu.com/grpc-metadata-trailers/). The service itself, as a thing that lives in the descriptor and nowhere on the wire, is in the [service post](https://datajutsu.com/protobuf-service-rpc-diff/), and the tool at [proto.datajutsu.com](https://proto.datajutsu.com/?ref=datajutsu.com) has the decode tab that opens this envelope, and the raw decode tab is the no schema version of the same problem.

That is where it lands. The reflection service is a bidirectional stream, and the smallest question is two bytes, and the answer to the question that actually matters, what is your schema, is a blob that the response schema itself refuses to describe. It works because the client already carries the one meta schema that can read every descriptor, and everything else, the service names, the method signatures, the streaming flags, the field numbers, sits inside the blob, identical to what the compiler would have produced. The tool sits at the boundary of that: the decode tab opens the envelope and shows you the base64 where the schema should be, and the raw decode tab is what you reach for on the days when there is no reflection service on the other end to ask at all.