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 schema update async api #2488

Merged
merged 4 commits into from
Nov 28, 2023
Merged

Conversation

Romakita
Copy link
Collaborator

Information

Type Breaking change
Feature No

Add a preview support of AsyncApi #1952

@github-actions
Copy link

Benchmarks

  • Machine: linux x64 | 2 vCPUs | 6.8GB Mem
  • Node: v16.20.2
  • Run: Thu Oct 26 2023 07:09:51 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 41411.2 23.71 7.38
nest-fastify 8.4.3 37721.6 26.14 6.73
koa 2.13.4 31458.4 31.32 5.61
fastify-injector 3.29.4 21424.4 45.97 4.88
express 4.18.1 8278.2 119.79 1.48
tsed-koa 7.41.0 7626.4 129.91 6.66
fastify-big-json 3.29.4 7018.8 141.55 80.75
nest 8.4.3 6856.8 144.76 1.65
express-injector 4.18.1 6359.6 156.10 1.45
tsed-express 7.41.0 5895.5 168.20 1.08
express-morgan 4.18.1 4728.5 209.38 0.84

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: v16.20.2
  • Run: Thu Nov 16 2023 09:02:05 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 55222.4 17.61 9.85
nest-fastify 8.4.3 49443.2 19.73 8.82
koa 2.13.4 40707.2 24.06 7.26
fastify-injector 3.29.4 29282.2 33.62 6.67
express 4.18.1 12263.2 80.91 2.19
tsed-koa 7.45.0 12246.9 80.92 10.70
fastify-big-json 3.29.4 11413.6 86.88 131.29
nest 8.4.3 10894.9 90.88 2.62
express-injector 4.18.1 10226.5 96.99 2.33
tsed-express 7.45.0 9542.0 103.85 1.75
express-morgan 4.18.1 7040.2 140.78 1.26

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 feat-schema-update-async-api branch from f92c0bf to 41b801a Compare November 28, 2023 07:41
@Romakita Romakita merged commit 5e01b40 into production Nov 28, 2023
30 of 32 checks passed
@Romakita Romakita deleted the feat-schema-update-async-api branch November 28, 2023 07:51
Copy link

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v16.20.2
  • Run: Tue Nov 28 2023 07:54:04 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 54729.6 17.77 9.76
nest-fastify 8.4.3 47609.6 20.51 8.49
koa 2.13.4 39040.0 25.11 6.96
fastify-injector 3.29.4 28773.1 34.22 6.56
express 4.18.1 12198.4 81.27 2.18
tsed-koa 7.49.0 11945.1 82.99 10.43
fastify-big-json 3.29.4 11533.5 85.92 132.68
nest 8.4.3 10783.2 91.97 2.59
express-injector 4.18.1 10279.6 96.36 2.34
tsed-express 7.49.0 9641.6 102.74 1.77
express-morgan 4.18.1 6992.6 141.66 1.25

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
Copy link
Collaborator Author

🎉 This PR is included in version 7.50.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant