Skip to content

kamilkisiela/node-graphql-benchmarks

 
 

Repository files navigation

TL;DR

  • graphql-jit helps
  • apollo-server adds overhead
  • tracing resolvers kills performance
  • type-graphql adds overhead

Explanation

For further details, please check out this video.

Usage

git clone https://github.com/benawad/benchmarks
cd benchmarks
npm install
npm start

Benchmarks

duration: 5s connections: 5 pipelining: 1

Server Requests/s Latency Throughput/Mb
uWebSockets-graphql+jit 7898.0 0.08 48.59
core-graphql-jit-str 6438.0 0.28 40.02
core-graphql-jit-buf 6325.2 0.28 39.32
core-graphql-jit-buf-fjs 6299.6 0.28 39.15
benzene-http 6176.4 0.28 38.69
mercurius+graphql-jit 5862.0 0.28 36.71
fastify-REST 5384.4 0.30 43.19
graphql-api-koa+graphql-jit 3765.4 1.22 23.55
express-REST 3758.2 1.03 30.38
mercurius+graphql-compose 3741.4 0.73 23.42
mercurius 3696.6 0.93 23.14
mercurius+graphql-jit+type-graphql 3600.6 1.24 22.54
apollo-server-fastify+graphql-jit 3446.6 1.25 21.68
fastify-express-graphql-jit 3428.2 1.26 0.94
express-gql 3391.4 1.31 21.45
fastify-express-graphql-typed-jit 3207.4 1.26 0.88
express-graphql+graphql-jit+graphql-compose 2974.6 1.30 18.81
express-graphql+graphql-jit 2950.6 1.31 18.66
express-graphql+graphql-jit+type-graphql 2720.2 1.36 17.20
graphql-api-koa 2707.8 1.37 16.93
apollo-server-fastify 2647.0 1.40 16.65
fastify-express-grapql-typed 2448.6 1.57 0.67
apollo-server-koa+graphql-jit+type-graphql 2337.8 1.60 14.63
express-graphql+graphql-compose 2254.6 1.66 14.26
graphql-compose+async 2234.6 1.67 14.13
express-graphql-dd-trace-no-plugin 2227.0 1.66 14.08
express-graphql 2223.4 1.66 14.06
express-graphql+type-graphql 2196.2 1.67 13.89
apollo-schema+async 2192.6 1.67 13.87
type-graphql+async 2134.8 1.69 13.50
type-graphql+middleware 2107.8 1.71 13.33
type-graphql+async-middleware 2069.4 1.76 13.09
yoga-graphql 2030.0 1.83 12.78
apollo-server-express 1662.4 2.70 10.56
apollo-opentracing 1199.8 3.56 7.63
yoga-graphql-trace 1193.6 3.59 37.96
express-graphql-dd-trace-less 1118.8 4.18 7.08
express-graphql-dd-trace 1039.4 4.32 6.57
apollo-server-express-tracing 989.6 4.54 31.52

About

Benchmarks for different Node.js GraphQL Servers

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.6%
  • TypeScript 4.4%