Skip to content
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

feat: implement fastify server #2437

Closed
wants to merge 3 commits into from
Closed

feat: implement fastify server #2437

wants to merge 3 commits into from

Conversation

Romakita
Copy link
Collaborator

No description provided.

@Romakita Romakita marked this pull request as draft September 19, 2023 05:24
@Romakita Romakita changed the title wip feat: impement fastify server Sep 19, 2023
@Romakita Romakita changed the title feat: impement fastify server feat: implement fastify server Sep 20, 2023
@Romakita Romakita mentioned this pull request Sep 26, 2023
15 tasks
@Romakita Romakita force-pushed the feat-fastify branch 3 times, most recently from f00f933 to 1af265e Compare January 4, 2024 07:02
Copy link

github-actions bot commented Feb 3, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.19.0
  • Run: Sat Feb 03 2024 08:48:57 GMT+0000 (Coordinated Universal Time)
  • Method: autocannon -c 100 -d 10 -p 10 localhost:3000 (two rounds; one to warm-up, one to measure)
Version Router Requests/s Latency Throughput/Mb
fastify 3.29.4 42422.4 23.06 7.57
nest-fastify 8.4.3 39520.0 24.81 7.05
koa 2.13.4 34252.4 28.70 6.11
fastify-injector 3.29.4 29482.9 33.39 6.72
express 4.18.1 10838.2 91.51 1.93
fastify-big-json 3.29.4 9859.0 100.45 113.41
nest 8.4.3 9820.0 100.82 2.36
express-injector 4.18.1 9342.4 106.14 2.13
express-morgan 4.18.1 6972.4 142.13 1.24
tsed-express 7.61.0 N/A N/A N/A
tsed-koa 7.61.0 N/A N/A N/A

Explanation

The benchmark shows a performance difference between the frameworks. We note that Ts.ED is often last. In fact, Ts.ED uses features useful to a production application which reduce its performance.

For example, Ts.ED initializes a sandbox (async_hook) for each request in order to work in an isolated context if necessary.
It also initializes the elements necessary for monitoring requests in a log manager.

All this at a necessary cost that reflects the reality of a production application ;)

@Romakita Romakita force-pushed the production branch 6 times, most recently from f37ccd1 to 5306644 Compare February 18, 2024 10:58
@Romakita Romakita force-pushed the feat-fastify branch 4 times, most recently from 3faec1c to 97ca551 Compare March 4, 2024 06:58
Copy link

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.19.1
  • Run: Sun Mar 24 2024 09:27:42 GMT+0000 (Coordinated Universal Time)
  • Method: autocannon -c 100 -d 10 -p 10 localhost:3000 (two rounds; one to warm-up, one to measure)
Version Router Requests/s Latency Throughput/Mb
koa 2.13.4 34043.6 28.86 6.07
tsed-koa 7.67.0 11684.0 84.82 9.89
express 4.18.1 10255.6 96.66 1.83
nest 8.4.3 9838.2 100.77 2.36
express-injector 4.18.1 9655.8 102.43 2.20
tsed-express 7.67.0 8685.0 114.11 1.59
express-morgan 4.18.1 5713.6 173.18 1.02
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

Explanation

The benchmark shows a performance difference between the frameworks. We note that Ts.ED is often last. In fact, Ts.ED uses features useful to a production application which reduce its performance.

For example, Ts.ED initializes a sandbox (async_hook) for each request in order to work in an isolated context if necessary.
It also initializes the elements necessary for monitoring requests in a log manager.

All this at a necessary cost that reflects the reality of a production application ;)

Copy link

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.19.1
  • Run: Sun Mar 24 2024 09:46:01 GMT+0000 (Coordinated Universal Time)
  • Method: autocannon -c 100 -d 10 -p 10 localhost:3000 (two rounds; one to warm-up, one to measure)
Version Router Requests/s Latency Throughput/Mb
koa 2.13.4 34194.4 28.73 6.10
tsed-koa 7.67.0 11982.9 82.68 10.15
express 4.18.1 10485.5 94.36 1.87
nest 8.4.3 9939.8 99.81 2.39
express-injector 4.18.1 9195.8 107.61 2.10
tsed-express 7.67.0 8751.6 113.06 1.60
express-morgan 4.18.1 5635.6 175.60 1.00
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

Explanation

The benchmark shows a performance difference between the frameworks. We note that Ts.ED is often last. In fact, Ts.ED uses features useful to a production application which reduce its performance.

For example, Ts.ED initializes a sandbox (async_hook) for each request in order to work in an isolated context if necessary.
It also initializes the elements necessary for monitoring requests in a log manager.

All this at a necessary cost that reflects the reality of a production application ;)

Copy link

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.19.1
  • Run: Sun Mar 24 2024 10:18:36 GMT+0000 (Coordinated Universal Time)
  • Method: autocannon -c 100 -d 10 -p 10 localhost:3000 (two rounds; one to warm-up, one to measure)
Version Router Requests/s Latency Throughput/Mb
koa 2.13.4 34670.6 28.33 6.18
tsed-koa 7.67.0 12099.3 81.88 10.25
express 4.18.1 10520.4 94.27 1.88
nest 8.4.3 10449.1 94.85 2.51
express-injector 4.18.1 9516.2 104.14 2.17
tsed-express 7.67.0 8903.0 111.29 1.63
express-morgan 4.18.1 5732.8 172.50 1.02
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

Explanation

The benchmark shows a performance difference between the frameworks. We note that Ts.ED is often last. In fact, Ts.ED uses features useful to a production application which reduce its performance.

For example, Ts.ED initializes a sandbox (async_hook) for each request in order to work in an isolated context if necessary.
It also initializes the elements necessary for monitoring requests in a log manager.

All this at a necessary cost that reflects the reality of a production application ;)

@Romakita Romakita force-pushed the production branch 4 times, most recently from b76e7c8 to 9230a2a Compare August 25, 2024 08:18
@Romakita Romakita force-pushed the production branch 7 times, most recently from e7aa499 to 000a6b4 Compare December 5, 2024 20:03
@Romakita
Copy link
Collaborator Author

Romakita commented Dec 8, 2024

#2925

@Romakita Romakita closed this Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant