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

fix(platform-serverless): fix compilation issue on ServerlessContext #2757

Merged
merged 1 commit into from
Jul 21, 2024

Conversation

Romakita
Copy link
Collaborator

Information

Type Breaking change
Fix No

Fix compilation issue introduced with v7.76.0 to support all aws event

@Romakita Romakita force-pushed the fix-serverless-compilation-issue branch from f2be26a to eb7c17e Compare July 21, 2024 08:25
@Romakita Romakita merged commit d2e6cd2 into production Jul 21, 2024
15 checks passed
@Romakita Romakita deleted the fix-serverless-compilation-issue branch July 21, 2024 08:29
Copy link

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.4
  • Run: Sun Jul 21 2024 08:36:44 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 33388.8 29.43 5.95
tsed-koa 7.76.1 11890.5 83.34 10.07
express 4.19.2 10450.4 94.87 1.86
nest 8.4.3 9731.4 101.93 2.34
express-injector 4.19.2 9323.8 106.26 2.12
tsed-express 7.76.1 8592.5 115.40 1.57
express-morgan 4.19.2 5580.2 177.34 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 ;)

@Romakita
Copy link
Collaborator Author

🎉 This PR is included in version 7.76.2 🎉

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