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): add support of REQUEST type lambda authorizer #2779

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

Romakita
Copy link
Collaborator

@Romakita Romakita commented Aug 7, 2024

Information

Type Breaking change
fix No

Information

This PR improve support of lambda authorizer for the REQUEST type event

Todos

  • Tests
  • Coverage
  • Example
  • Documentation

@Romakita Romakita merged commit 92a90d9 into production Aug 7, 2024
15 checks passed
@Romakita Romakita deleted the fix-serverless-request-auth-type branch August 7, 2024 10:26
Copy link

github-actions bot commented Aug 7, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.4
  • Run: Wed Aug 07 2024 10:29:16 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 32824.0 29.92 5.85
tsed-koa 7.79.3 11211.3 88.34 9.49
express 4.19.2 10224.5 96.97 1.82
nest 8.4.3 9544.2 103.68 2.29
express-injector 4.19.2 9440.2 105.01 2.15
tsed-express 7.79.3 7864.4 125.95 1.44
express-morgan 4.19.2 5448.8 181.52 0.97
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

Romakita commented Aug 7, 2024

🎉 This PR is included in version 7.79.4 🎉

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