Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit feb1cc1

Browse files
authored
Merge branch 'tailcallhq:main' into nginx-delay
2 parents 196058b + f245ba9 commit feb1cc1

30 files changed

+1333
-130
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y \
1717
&& rm -rf /var/lib/apt/lists/*
1818

1919
# Install the latest LTS version of Node.js
20-
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
20+
RUN curl -L https://deb.nodesource.com/nsolid_setup_deb.sh | bash -s -- 18 && \
2121
apt-get install -y nodejs
2222

2323
# Install Go

README.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Explore and compare the performance of the fastest GraphQL frameworks through ou
2424
[Caliban]: https://github.com/ghostdogpr/caliban
2525
[async-graphql]: https://github.com/async-graphql/async-graphql
2626
[Hasura]: https://github.com/hasura/graphql-engine
27+
[GraphQL JIT]: https://github.com/zalando-incubator/graphql-jit
2728

2829
## Introduction
2930

@@ -50,29 +51,32 @@ Get started with the benchmarks:
5051
| Query | Server | Requests/sec | Latency (ms) | Relative |
5152
|-------:|--------:|--------------:|--------------:|---------:|
5253
| 1 | `{ posts { id userId title user { id name email }}}` |
53-
|| [Tailcall] | `30,731.30` | `3.24` | `108.23x` |
54-
|| [async-graphql] | `1,748.25` | `57.58` | `6.16x` |
55-
|| [Caliban] | `1,533.14` | `65.09` | `5.40x` |
56-
|| [Hasura] | `1,528.73` | `65.21` | `5.38x` |
57-
|| [Gqlgen] | `662.59` | `150.51` | `2.33x` |
58-
|| [Netflix DGS] | `361.82` | `164.52` | `1.27x` |
59-
|| [Apollo GraphQL] | `283.94` | `346.80` | `1.00x` |
54+
|| [Tailcall] | `29,865.00` | `3.34` | `112.98x` |
55+
|| [async-graphql] | `1,824.45` | `54.68` | `6.90x` |
56+
|| [Caliban] | `1,631.74` | `60.96` | `6.17x` |
57+
|| [Hasura] | `1,513.32` | `65.92` | `5.72x` |
58+
|| [GraphQL JIT] | `1,308.30` | `76.09` | `4.95x` |
59+
|| [Gqlgen] | `771.42` | `128.66` | `2.92x` |
60+
|| [Netflix DGS] | `360.56` | `174.79` | `1.36x` |
61+
|| [Apollo GraphQL] | `264.34` | `370.65` | `1.00x` |
6062
| 2 | `{ posts { title }}` |
61-
|| [Tailcall] | `62,781.70` | `1.58` | `39.12x` |
62-
|| [Caliban] | `9,206.32` | `11.23` | `5.74x` |
63-
|| [async-graphql] | `8,679.90` | `11.56` | `5.41x` |
64-
|| [Hasura] | `2,542.85` | `39.31` | `1.58x` |
65-
|| [Gqlgen] | `2,270.77` | `45.08` | `1.42x` |
66-
|| [Apollo GraphQL] | `1,790.88` | `55.76` | `1.12x` |
67-
|| [Netflix DGS] | `1,604.71` | `68.88` | `1.00x` |
63+
|| [Tailcall] | `61,611.40` | `1.61` | `45.11x` |
64+
|| [Caliban] | `9,406.21` | `10.99` | `6.89x` |
65+
|| [async-graphql] | `9,366.90` | `10.76` | `6.86x` |
66+
|| [Hasura] | `2,450.62` | `40.79` | `1.79x` |
67+
|| [Gqlgen] | `2,150.47` | `48.08` | `1.57x` |
68+
|| [Apollo GraphQL] | `1,745.86` | `57.22` | `1.28x` |
69+
|| [Netflix DGS] | `1,602.77` | `69.19` | `1.17x` |
70+
|| [GraphQL JIT] | `1,365.94` | `73.10` | `1.00x` |
6871
| 3 | `{ greet }` |
69-
|| [Tailcall] | `65,204.50` | `1.55` | `25.47x` |
70-
|| [Gqlgen] | `50,124.00` | `5.35` | `19.58x` |
71-
|| [async-graphql] | `49,848.30` | `2.07` | `19.47x` |
72-
|| [Caliban] | `46,625.10` | `2.47` | `18.21x` |
73-
|| [Netflix DGS] | `8,306.34` | `14.78` | `3.24x` |
74-
|| [Apollo GraphQL] | `8,131.77` | `12.50` | `3.18x` |
75-
|| [Hasura] | `2,560.30` | `38.96` | `1.00x` |
72+
|| [Caliban] | `69,058.50` | `1.06` | `27.21x` |
73+
|| [Tailcall] | `63,879.10` | `1.58` | `25.17x` |
74+
|| [async-graphql] | `50,746.10` | `2.10` | `20.00x` |
75+
|| [Gqlgen] | `46,935.70` | `5.11` | `18.50x` |
76+
|| [Netflix DGS] | `8,233.67` | `14.43` | `3.24x` |
77+
|| [Apollo GraphQL] | `8,028.37` | `12.66` | `3.16x` |
78+
|| [GraphQL JIT] | `5,097.42` | `19.59` | `2.01x` |
79+
|| [Hasura] | `2,537.66` | `39.39` | `1.00x` |
7680

7781
<!-- PERFORMANCE_RESULTS_END -->
7882

analyze.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ formattedServerNames=(
1919
["caliban"]="Caliban"
2020
["async_graphql"]="async-graphql"
2121
["hasura"]="Hasura"
22+
["graphql_jit"]="GraphQL JIT"
2223
)
2324

24-
servers=("apollo" "caliban" "netflixdgs" "gqlgen" "tailcall" "async_graphql" "hasura")
25+
servers=("apollo" "caliban" "netflixdgs" "gqlgen" "tailcall" "async_graphql" "hasura" "graphql_jit")
2526
resultFiles=("$@")
2627
declare -A avgReqSecs
2728
declare -A avgLatencies

assets/latency_histogram1.png

1.11 KB
Loading

assets/latency_histogram2.png

1.14 KB
Loading

assets/latency_histogram3.png

1.09 KB
Loading

assets/req_sec_histogram1.png

1.06 KB
Loading

assets/req_sec_histogram2.png

1.11 KB
Loading

assets/req_sec_histogram3.png

1.82 KB
Loading

graphql/apollo_server/package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

graphql/async_graphql/Cargo.lock

Lines changed: 32 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

graphql/async_graphql/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ reqwest = { version = "0.12.4", features = ["json"] }
1313
serde = "1.0.200"
1414
serde_json = "1.0.116"
1515
futures = "0.3.30"
16+
mimalloc = { version = "0.1.41", default-features = false }

graphql/async_graphql/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
use mimalloc::MiMalloc;
2+
3+
#[global_allocator]
4+
static GLOBAL: MiMalloc = MiMalloc;
5+
16
use std::{collections::HashMap, sync::Arc, time::Duration};
27

38
use async_graphql::{

graphql/caliban/build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ lazy val root = (project in file("."))
1010
run / javaOptions ++= Seq("-Xms4G", "-Xmx4G"),
1111
libraryDependencies ++= Seq(
1212
"com.github.ghostdogpr" %% "caliban-quick" % "2.8.1",
13-
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-core" % "2.30.4",
14-
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % "2.30.4" % Provided,
13+
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-core" % "2.30.7",
14+
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % "2.30.7" % Provided,
1515
"org.apache.httpcomponents.client5" % "httpclient5" % "5.3.1",
16-
"dev.zio" %% "zio" % "2.1.5"
16+
"dev.zio" %% "zio" % "2.1.6"
1717
)
1818
)
1919

graphql/caliban/src/main/scala/Api.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ object ServiceSchema extends SchemaDerivation[Service]
99

1010
case class Query(
1111
posts: RIO[Service, List[Post]],
12-
greet: UIO[String] = ZIO.succeed("Hello World!")
12+
greet: () => String = () => "Hello World!"
1313
) derives ServiceSchema.SemiAuto
1414

1515
case class User(

graphql/gqlgen/graph/schema.resolvers.go

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)