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

[Feature Request]: Support for multiple HTTP triggers on same function #2936

Open
1 of 3 tasks
dberardo-com opened this issue May 22, 2023 · 2 comments
Open
1 of 3 tasks

Comments

@dberardo-com
Copy link

Feature Type

  • Adding new functionality to Nuclio

  • Changing existing functionality in Nuclio

  • Removing existing functionality in Nuclio

Problem Description

unfortunately not currently possible to have more then one HTTP trigger on the same function

Feature Description

It would also be great to be able to attach different Gateways to different HTTP triggers (ports)

Alternative Solutions

i am currently not aware of any

Additional Context

No response

@TomerShor
Copy link
Contributor

Hey @dberardo-com !
What is the reason you would like multiple http triggers?

Note that for a single http trigger you can create multiple ingresses, and API Gateway, so the function will be available in multiple endpoints.

@dberardo-com
Copy link
Author

basically i have one function that uses multiple http triggers, but each trigger has a different context (basically opens up a different DB connection). And the HTTP request needs to access this different context information, and since objects cant be shared between different contexts (workers) then i must use different HTTP triggers.

One could argue that i could use different functions to achieve that, however the overhead of using 1 function per connection instead of 1 context per connection turned out to be quite high in my case.

i have got one instance in which i am using about 22 connections (triggers) consuming a total of about 500MB of RAM, while one function would require about 80MB of RAM which would totalize to about 2GB of RAM (4x more)

btw, how did i get here? basically while finding a solution to the same underlying use case as described in: #2352 (comment)

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

No branches or pull requests

2 participants