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

HTTP Router Proposal #596

Closed
willfarrell opened this issue Jan 3, 2021 · 2 comments
Closed

HTTP Router Proposal #596

willfarrell opened this issue Jan 3, 2021 · 2 comments

Comments

@willfarrell
Copy link
Member

willfarrell commented Jan 3, 2021

Proposal for a new http router middleware that could allow for multiple api endpoints to be resolved by the same lambda. This can be beneficial for endpoints that are likely to hit cold starts and other strategies.

Related work: https://www.npmjs.com/package/middy-reroute

Please 👍🏻 this issue if it would have value to you.

If you can comment with your use case below, that would be helpful.

@willfarrell willfarrell changed the title New Middleware Proposal: HTTP Router New Proposal: HTTP Router Jan 9, 2021
@willfarrell willfarrell changed the title New Proposal: HTTP Router HTTP Router Proposal Jan 9, 2021
@nponeccop
Copy link
Contributor

I don't need an HTTP router, but I could benefit from an arbitrary router. That is, you form an arbitrary routing key and then route based on the key, or something like that. In my app, a user has routeId stored in the database. When it calls my API, I get routeId from his userId and call different backends depending on that. I'm not sure if it such a router is useful to enough people though.

@willfarrell
Copy link
Member Author

I've put together a http-router (#782). Still needs a little love, but think it's mostly there. Would like some feedback on features people were hoping it would have.

Sorry, but it's not a generic router. You could lift the logic and build your own with ease.

@willfarrell willfarrell mentioned this issue Jan 11, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants