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(platform-cache): add prefix option on useCache and add method to get keys related to Class/method #2430

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

Romakita
Copy link
Collaborator

@Romakita Romakita commented Sep 7, 2023

No description provided.

@Romakita Romakita merged commit 0d54611 into production Sep 7, 2023
20 of 34 checks passed
@Romakita Romakita deleted the feat-cache-redis-global-prefix branch September 7, 2023 12:02
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

Benchmarks

  • Machine: linux x64 | 2 vCPUs | 6.8GB Mem
  • Node: v16.20.2
  • Run: Thu Sep 07 2023 12:16:17 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 43228.8 22.68 7.71
nest-fastify 8.4.3 36529.6 26.88 6.51
koa 2.13.4 33364.8 29.58 5.95
fastify-injector 3.29.4 22012.8 44.97 5.02
express 4.18.1 8615.8 115.30 1.54
tsed-koa 7.34.9 7250.0 136.59 6.33
fastify-big-json 3.29.4 7228.8 137.28 83.16
nest 8.4.3 7159.2 138.52 1.72
express-injector 4.18.1 6444.8 153.80 1.47
tsed-express 7.34.9 5809.1 170.56 1.06
express-morgan 4.18.1 4660.3 212.07 0.83

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

Romakita commented Sep 7, 2023

🎉 This PR is included in version 7.35.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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant