Skip to content

mplibunao/node-graphql-benchmarks

 
 

Repository files navigation

TL;DR

  • graphql-jit helps
  • apollo-server adds overhead
  • tracing resolvers kills performance
  • type-graphql adds overhead
  • For metrics (cold-start) see metrics.md

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.01s connections: 5 pipelining: 1

Server Requests/s Latency Throughput/Mb
go-graphql 23892.8 0.01 39.78
rust-graphql 9754.4 0.01 57.15
uWebSockets-graphql+jit 6838.8 0.27 42.07
core-graphql-jit-buf 5563.6 0.28 34.58
core-graphql-jit-buf-fjs 5531.6 0.29 34.38
benzene-jit-http 5432.4 0.29 34.02
core-graphql-jit-str 5414.0 0.30 33.65
mercurius+graphql-jit 5012.4 0.31 31.38
fastify-REST 4633.2 0.35 37.14
express-REST 3239.0 1.11 26.18
graphql-api-koa+graphql-jit 3163.4 1.26 19.78
fastify-express-graphql-jit 3025.8 1.26 0.83
express-gql 2979.0 1.33 18.84
fastify-express-graphql-typed-jit 2812.6 1.28 0.77
mercurius+graphql-compose 2789.0 1.32 17.46
benzene-http 2735.4 1.32 17.13
mercurius 2695.4 1.34 16.87
mercurius+graphql-jit+type-graphql 2642.2 1.36 16.54
express-graphql+graphql-jit+graphql-compose 2499.0 1.48 15.80
express-graphql+graphql-jit 2462.6 1.52 15.57
express-graphql+graphql-jit+type-graphql 2248.2 1.68 14.21
yoga-graphql 2220.8 1.71 0.98
graphql-api-koa 2035.6 1.77 12.73
yoga-graphql-trace 2016.6 1.95 0.89
apollo-server-fastify+graphql-jit 1968.0 1.90 12.38
apollo-server-koa+graphql-jit+type-graphql 1886.0 2.28 11.81
fastify-express-grapql-typed 1837.2 2.36 0.50
express-graphql 1756.2 2.55 11.11
express-graphql+graphql-compose 1736.8 2.57 10.99
graphql-compose+async 1696.4 2.60 10.73
apollo-schema+async 1678.8 2.60 10.62
type-graphql+async 1663.0 2.60 10.52
express-graphql-dd-trace-no-plugin 1662.4 2.61 10.51
express-graphql+type-graphql 1648.2 2.62 10.43
type-graphql+middleware 1639.8 2.62 10.37
type-graphql+async-middleware 1628.0 2.66 10.30
apollo-server-fastify 1502.6 2.87 9.45
apollo-server-express-tracing 1261.6 3.38 8.02
apollo-server-express 1254.4 3.44 7.97
apollo-opentracing 1032.0 4.30 6.56
express-graphql-dd-trace-less 893.4 5.22 5.65
express-graphql-dd-trace 873.0 5.35 5.52

About

Benchmarks for different Node.js GraphQL Servers

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.0%
  • Rust 2.6%
  • Go 2.5%
  • TypeScript 1.9%