What is the difference between gRPC metadata sent as headers versus trailers, and what is binary metadata?

Last updated 8 July 2026

  • Headers (leading metadata) are sent before the message body, so they carry values known up front like auth tokens and request IDs.

  • Trailers are sent after the body, so they carry values computed during processing such as grpc-status, grpc-message and metrics. This is essential for streaming.

  • Binary metadata uses keys ending in -bin to hold arbitrary bytes (base64-encoded on the wire automatically). Other values must be ASCII strings.

  • https://grpc.io/docs/guides/metadata/
  • https://grpc.github.io/grpc/core/md_doc__p_r_o_t_o_c_o_l-_h_t_t_p2.html
  • https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md
  • https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md?plain=1
  • https://oneuptime.com/blog/post/2026-01-24-grpc-metadata/view
  • https://kreya.app/blog/grpc-deep-dive/
All gRPC interview questions