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 Issues

Take a look to see if anyone else has experienced the same issue as you and if they managed to solve it.

Open an Issue

Make sure to read any relevant guidelines for opening issues on this repo before posting a new issue.

Sponsor directly

Check 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:

screenshot

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

  1. Install mkcert and generate certificates

  2. 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

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.

Interesting Articles

Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated

p-e622a1a2