Skip to content

humbertodias/node-http-vs123

Repository files navigation

HTTP 1 vs 2 vs 3

Node app to compare http 1 vs 2 vs 3 protocol.

graph TD;
    A[http1] -->|:3001| D{gateway};
    B[http2] -->|:3002| D;
    C[http3] -->|:3003| D;
    D <---> |:3000| E[Browser];
Loading

Prerequisites

  1. Docker 25+
  2. make

Running

make run

Access the gateway: http://localhost:3000

Result

http/2 spent 223/48 = 4.66x less bytes than http/1 response.

Protocol Size Time
http/1 223B 25ms
http/2 48B 21ms
http/3 44B 20ms

Note

The original image nodejs.png has 512x512 and each tile was cropped as 16x16

References

  1. Easy HTTP/2 Server with Node.js and Express.js
  2. As-fantasticas-novidades-do-http-2-0-e-do-spdy
  3. http-2-with-node-js
  4. http2-curl-macosx
  5. h3

About

Node app to compare http 1 vs 2 vs 3 protocol.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published