Thrift protocol

Feature description

The thrift protocol currently supported by dubbo is an extension of the thrift native protocol, adding some additional header information on the basis of the native protocol, such as service name, magic number, etc. 2.3.0 and above are supported.

Thrift is an RPC framework donated by Facebook to Apache.

Using the dubbo thrift protocol also needs to use thrift’s idl compiler to compile and generate the corresponding java code, and some enhancements will be made in this regard in subsequent versions.

scenes to be used

For SOA standard RPC framework.

How to use


Starting from Dubbo 3, the Thrift protocol is no longer embedded in Dubbo, and an independent module needs to be introduced separately.


All services share one port

Incompatible with native Thrift

<dubbo:protocol name="thrift" port="3030" />

[Example code in dubbo project]( /thrift)

Thrift does not support null values, ie: you cannot pass null values in the protocol

Last modified February 22, 2023: Merge refactor website (#2293) (4517e8c1c9c)