Explore and compare the performance of the fastest GraphQL frameworks through our comprehensive benchmarks.
This document presents a comparative analysis of several renowned GraphQL frameworks. Dive deep into the performance metrics, and get insights into their throughput and latency.
NOTE: This is a work in progress suite of benchmarks, and we would appreciate help from the community to add more frameworks or tune the existing ones for better performance.
Get started with the benchmarks:
- Click on this link to set up on GitHub Codespaces.
- Once set up in Codespaces, initiate the benchmark tests:
./run_benchmarks.sh
Server | Requests/sec | Latency (ms) |
---|---|---|
Tailcall | 2,890.68 |
34.69 |
Gqlgen | 935.00 |
115.73 |
Apollo GraphQL | 793.37 |
128.22 |
Netflix DGS | 597.39 |
191.85 |
A client (wrk
) sends requests to a GraphQL server to fetch post titles. The GraphQL server, in turn, retrieves data from an external source, jsonplaceholder.typicode.com
, routed through the nginx
reverse proxy. Here is the complete GraphQL query:
{
posts {
title
}
}
wrk
serves as our test client, sending GraphQL requests at a high rate.
Our tested GraphQL server. We evaluated various implementations, ensuring no caching on the GraphQL server side.
A reverse-proxy that caches every response, mitigating rate-limiting and reducing network uncertainties.
The primary upstream service forming the base for our GraphQL API. We query its /posts
API via the GraphQL server.
Inspect the generated GraphQL schema employed for the benchmarks:
schema {
query: Query
}
type Query {
posts: [Post]
}
type Post {
id: Int!
userId: Int!
title: String!
body: String!
}
Your insights are invaluable! Test these benchmarks, share feedback, or contribute by adding more GraphQL frameworks or refining existing ones. Open an issue or a pull request, and let's build a robust benchmarking resource together!