8000 build(deps): replace `proxy-addr` with `@fastify/proxy-addr` by Fdawgs · Pull Request #5913 · fastify/fastify · GitHub
[go: up one dir, main page]

Skip to content

build(deps): replace proxy-addr with @fastify/proxy-addr #5913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 28, 2024
Merged

Conversation

Fdawgs
Copy link
Member
@Fdawgs Fdawgs commented Dec 28, 2024

As mentioned in fastify/proxy-addr#52, @fastify/proxy-addr is faster than proxy-addr due to the @fastify/forwarded fork.

Checklist

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 28, 2024
@Fdawgs Fdawgs added the benchmark Label to run benchmark against PR and main branch label Dec 28, 2024
Copy link

Node: 20
PR: [1] 1477k requests in 30.04s, 277 MB read
MAIN: [1] 1524k requests in 30.04s, 286 MB read


Node: 22
PR: [1] 1435k requests in 30.04s, 269 MB read
MAIN: [1] 1471k requests in 30.04s, 276 MB read

Copy link

Node: 20
PR: [1] 1559k requests in 30.04s, 293 MB read
MAIN: [1] 1550k requests in 30.04s, 291 MB read


Node: 22
PR: [1] 1415k requests in 30.05s, 266 MB read
MAIN: [1] 1518k requests in 30.04s, 285 MB read

@github-actions github-actions bot removed the benchmark Label to run benchmark against PR and main branch label Dec 28, 2024
@gurgunday
Copy link
Member
gurgunday commented Dec 28, 2024

all and compile are what matters:

Fastify version bench:

> /Users/gurgunday/.nvm/versions/node/v22.12.0/bin/node benchmark/compiling.js

  2 tests completed.

  re-compiling  x   266,204 ops/sec ±1.59% (192 runs sampled)
  pre-compiling x 1,378,355 ops/sec ±0.26% (197 runs sampled)

> /Users/gurgunday/.nvm/versions/node/v22.12.0/bin/node benchmark/kind.js

  3 tests completed.

  ipv4        x 1,434,307 ops/sec ±1.45% (192 runs sampled)
  ipv4-mapped x   437,080 ops/sec ±0.09% (196 runs sampled)
  ipv6        x   554,847 ops/sec ±1.43% (195 runs sampled)

> /Users/gurgunday/.nvm/versions/node/v22.12.0/bin/node benchmark/matching.js

  6 tests completed.

  trust none     x 22,475,003 ops/sec ±1.70% (190 runs sampled)
  trust all      x 46,984,338 ops/sec ±0.56% (195 runs sampled)
  trust single   x  1,434,945 ops/sec ±1.41% (195 runs sampled)
  trust first    x 46,407,961 ops/sec ±0.53% (191 runs sampled)
  trust subnet   x  1,460,830 ops/sec ±0.10% (195 runs sampled)
  trust multiple x  1,441,307 ops/sec ±1.34% (197 runs sampled)

original:

> /Users/gurgunday/.nvm/versions/node/v22.12.0/bin/node benchmark/compiling.js

  2 tests completed.

  re-compiling  x   288,284 ops/sec ±1.37% (195 runs sampled)
  pre-compiling x 1,524,601 ops/sec ±0.95% (193 runs sampled)

> /Users/gurgunday/.nvm/versions/node/v22.12.0/bin/node benchmark/kind.js

  3 tests completed.

  ipv4        x 1,501,259 ops/sec ±1.68% (196 runs sampled)
  ipv4-mapped x   433,521 ops/sec ±0.42% (196 runs sampled)
  ipv6        x   518,953 ops/sec ±1.39% (195 runs sampled)

> /Users/gurgunday/.nvm/versions/node/v22.12.0/bin/node benchmark/matching.js

  6 tests completed.

  trust none     x 7,870,762 ops/sec ±1.36% (191 runs sampled)
  trust all      x 9,507,996 ops/sec ±1.41% (195 runs sampled)
  trust single   x 1,507,601 ops/sec ±0.11% (193 runs sampled)
  trust first    x 9,572,051 ops/sec ±1.34% (197 runs sampled)
  trust subnet   x 1,570,250 ops/sec ±0.08% (196 runs sampled)
  trust multiple x 1,541,185 ops/sec ±1.24% (197 runs sampled)

Copy link
Member
@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gurgunday gurgunday merged commit c5f4a17 into main Dec 28, 2024
41 checks passed
@gurgunday gurgunday deleted the perf/proxy branch December 28, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0