Kitex uses the Binary protocol for serialization.


The Binary protocol is a serialization protocol that encodes data in binary format. Widely used in the Thrift framework, it is the default serialization protocol for Kitex when working with Thrift.

It provides a high-performance, compact data transmission and storage solution, supporting cross-language communication. It is particularly suitable for large-scale distributed systems and remote procedure call scenarios.


Specify the IDL type as Thrift when generating code (can also be left unspecified as it defaults to Thrift).


kitex -type thrift ${service_name} ${idl_name}.thrift


kitex -type thrift -service ${service_name} ${idl_name}.thrift

Additional Information

Kitex have optimized Thrift’s Binary protocol codec. For details of the optimization, please refer to the “Reference - High Performance Thrift Codec” chapter. If you want to close these optimizations, you can add the -no-fast-api argument when generating code.

Last modified June 24, 2024 : fix: correct the file path (#1096) (b3fa1a4)