Backend Development 10 min read

Performance Comparison of Dubbo, Motan, rpcx, gRPC, and Thrift RPC Frameworks

This article benchmarks the throughput, average latency, median latency, and maximum latency of five RPC frameworks—Dubbo, Motan, rpcx, gRPC, and Thrift—using a unified protobuf‑based service across varying client concurrency levels, and discusses the resulting performance trends and conclusions.

Architect's Tech Stack
Architect's Tech Stack
Architect's Tech Stack
Performance Comparison of Dubbo, Motan, rpcx, gRPC, and Thrift RPC Frameworks

Dubbo is an open‑source high‑performance Java RPC framework from Alibaba that integrates seamlessly with Spring, while Motan is a Java RPC framework released by Sina Weibo in 2016. rpcx brings Dubbo‑like capabilities to the Go ecosystem, gRPC is Google’s high‑performance, HTTP/2‑based RPC system, and Thrift is Apache’s cross‑language service framework.

To compare these frameworks we built a single test service that exchanges a BenchmarkMessage defined in protobuf (shown below) and an equivalent Thrift struct.

syntax = "proto2";
package main;
option optimize_for = SPEED;
message BenchmarkMessage {
  required string field1 = 1;
  optional string field9 = 9;
  optional bool field80 = 80 [default = false];
  // ... many other fields omitted for brevity ...
  optional int32 field104 = 104 [default = 0];
}

The corresponding Thrift definition is:

namespace java com.colobu.thrift;
struct BenchmarkMessage {
  1: string field1,
  2: i32 field2,
  3: i32 field3,
  4: string field4,
  // ... other fields omitted ...
  104: i32 field104,
}
service Greeter {
  BenchmarkMessage say(1: BenchmarkMessage name);
}

Test code for each framework was taken from the official demo repositories: Dubbo (github.com/alibaba/dubbo/tree/master/dubbo-demo), Motan (github.com/weibocom/motan/tree/master/motan-demo), rpcx and gRPC (github.com/smallnest/rpcx/tree/master/_benchmarks). Thrift was tested with Java.

Benchmark environment: two identical machines (CPU: Intel Xeon E5‑2620 v2 @ 2.10 GHz, 24 cores; Memory: 16 GB; OS: CentOS 6.4). One machine acted as server, the other as client. Software stack: Go 1.7, Java 1.8, Dubbo 2.5.4‑SNAPSHOT, Motan 0.2.2‑SNAPSHOT, gRPC 1.0.0, rpcx 2016‑09‑05, Thrift 0.9.3 (Java).

Benchmarks were run with client concurrency levels of 100, 500, 1000, 2000, and 5000. For each run we recorded throughput (calls / second), average latency, median latency, and maximum latency; all frameworks achieved 100 % success rate.

Throughput results (calls / s) show rpcx leading by a large margin, followed by Thrift, gRPC, Dubbo, and Motan. As client concurrency grows, Dubbo and Motan’s throughput drops sharply, while Thrift also degrades but remains reasonable at lower concurrency.

Average latency mirrors the throughput trend: rpcx stays under 30 ms, while Dubbo’s latency spikes at high concurrency. Median latency charts highlight gRPC as the best among the Java‑based frameworks.

Maximum latency measurements reveal rpcx’s worst case stays below 1 s, Motan stays under 2 s, while Dubbo and gRPC exhibit higher tail latencies.

In summary, rpcx demonstrates superior performance in this synthetic benchmark, gRPC performs well among Java frameworks, and Dubbo’s performance degrades noticeably under high client concurrency. Readers are encouraged to provide feedback and extend the benchmark to additional RPC systems.

RPCDubbogRPCPerformance BenchmarkThriftrpcxMotan
Architect's Tech Stack
Written by

Architect's Tech Stack

Java backend, microservices, distributed systems, containerized programming, and more.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.