Skip to content

IvanGoncharov/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: 5.04s connections: 5 pipelining: 1

Server Requests/s Latency Throughput/Mb
core-graphql-jit-str 5973.2 0.30 36.93
core-graphql-jit-buf 5858.8 0.30 36.23
uWebSockets-graphql+jit 5727.6 0.30 35.20
core-graphql-jit-buf-fjs 5679.6 0.30 35.13
fastify-REST 5486.8 0.35 43.88
fastify-gql+graphql-jit 5437.2 0.34 33.87
fastify-gql+graphql-jit+type-graphql 4573.4 0.45 28.49
express-REST 4278.2 0.53 34.49
express-gql 3600.2 0.86 22.65
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
fastify-gql+graphql-compose 2179.0 1.78 13.58
express-graphql+graphql-jit+type-graphql 2176.2 1.72 13.70
express-graphql+graphql-jit+graphql-compose 2059.4 1.91 12.96
apollo-server-fastify+graphql-jit 1740.6 2.33 10.88
graphql-api-koa 1726.8 2.50 10.76
graphql-compose+async 1600.0 2.75 10.07
express-graphql 1564.0 2.79 9.84
apollo-schema+async 1555.8 2.79 9.79
express-graphql+graphql-compose 1488.6 2.97 9.37
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
yoga-graphql 888.2 5.16 5.57
apollo-server-express-tracing 736.8 6.26 23.46
yoga-graphql-trace 609.6 7.69 19.39
express-graphql-dd-trace-less 576.4 8.16 3.63
express-graphql-dd-trace 529.6 8.95 3.33

About

Benchmarks for different Node.js GraphQL Servers

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.9%
  • TypeScript 6.1%