- graphql-jit helps
- apollo-server adds overhead
- tracing resolvers kills performance
For further details, please check out this video.
git clone https://github.com/benawad/benchmarks
cd benchmarks
npm install
npm start
duration: 5.05s connections: 5 pipelining: 1
Server | Requests/s | Latency | Throughput/Mb |
---|---|---|---|
fastify-REST | 5486.8 | 0.35 | 43.88 |
fastify-gql+graphql-jit | 5437.2 | 0.34 | 33.87 |
express-REST | 4278.2 | 0.53 | 34.49 |
graphql-api-koa+graphql-jit | 2817.8 | 1.34 | 17.55 |
express-graphql+graphql-jit | 2374.2 | 1.57 | 14.94 |
fastify-gql | 2367.0 | 1.58 | 14.74 |
express-graphql+graphql-jit+type-graphql | 2176.2 | 1.72 | 13.70 |
apollo-server-fastify+graphql-jit | 1740.6 | 2.33 | 10.88 |
graphql-api-koa | 1726.8 | 2.50 | 10.76 |
express-graphql | 1564.0 | 2.79 | 9.84 |
apollo-schema+async | 1555.8 | 2.79 | 9.79 |
express-graphql+type-graphql | 1481.0 | 2.90 | 9.32 |
type-graphql+async | 1455.8 | 2.93 | 9.16 |
type-graphql+middleware | 1452.0 | 2.94 | 9.14 |
type-graphql+async-middleware | 1409.4 | 3.01 | 8.87 |
apollo-server-fastify | 1383.6 | 3.10 | 8.64 |
express-graphql-dd-trace-no-plugin | 1311.0 | 3.28 | 8.25 |
apollo-server-express | 1238.6 | 3.45 | 7.83 |
apollo-opentracing | 913.8 | 4.92 | 5.78 |
apollo-server-express-tracing | 736.8 | 6.26 | 23.46 |
express-graphql-dd-trace | 606.0 | 7.76 | 3.81 |