Get support for dunglas/api-parallelism-benchmark
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
dunglas/api-parallelism-benchmark
API Parallelism Benchmark
This benchmark is designed to compare using GraphQL-like compound documents VS using HTTP/2 Server Push as proposed by the Vulcain protocol.
It also measures the performance impact of caching (server-side and client-side).
Results
With Google Chrome and the settings shown in this screenshot, I get the following results:
In these conditions (and with a warm TCP connection for both cases), HTTP/2 Server Push is 4 time faster than creating a compound documents.
Method | time (lowest is better) |
---|---|
HTTP Server Push | 214.34 |
Compound documents | 894.74 |
For smallest documents, multiplexing is almost useless. For medium and large ones, it helps a lot. The larger the volume of data, the more efficient the split over multiple HTTP responses.
Also, splitting data in small atomic documents allows to improve the HTTP cache efficiency: a response containing little data is less likely to be stale than a big response containing compound documents.
I'll publish more examples and a detailed analysis at some point. In the meantime, feel free to run the benchmark with your own inputs and share the results!
Run the Benchmark
Public Server
With Docker
docker run -e EMAIL=kevin@dunglas.fr -e DOMAIN_NAME=foo.com dunglas/api-parallelism-benchmark
Using Your Own Build
EMAIL=you@example.com DOMAIN_NAME=example.com ./api-parallelism-benchmark
Localhost
-
Install mkcert and generate certificates
-
Run the server using the local certs:
mkcert -install mkcert -key-file key.pem -cert-file cert.pem local.example.com CERT_FILE=cert.pem KEY_FILE=key.pem ./api-parallelism-benchmark
TODO
- Add support for Preload links
- Add support for Early Hints
- Maybe use the Caddy Server and the Vulcain module directly (they already support HTTP/3 and Preload links)
- Find a way to compare cold vs warm TCP connections
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2