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

Support multiple worker scenario in new framework #638

Closed
ejizba opened this issue Oct 11, 2022 · 1 comment
Closed

Support multiple worker scenario in new framework #638

ejizba opened this issue Oct 11, 2022 · 1 comment
Assignees
Labels
P1 v4 model 🚀 Related to the new V4 programming model
Milestone

Comments

@ejizba
Copy link
Contributor

ejizba commented Oct 11, 2022

Users can get into this situation by explicitly setting the FUNCTIONS_WORKER_PROCESS_COUNT app setting to 2 (or more).

It can also happen as a part of the intelligent worker concurrency feature that is currently rolling out. This feature is meant to help with performance and because there is no strict rule on when it will introduce new workers, it's a major blocker for the new framework in azure because we don't want random failures.

If you try the new framework, it just does not work with multiple workers. A few problems:

  1. The host expects the same metadata for each worker. Meaning if the second worker has a different function id or binding id, our worker fails to find that function or binding. Proposed fix is to make these ids deterministic
  2. The host sends requests to the second worker in a weird order. Tracking here: Investigate the ordering of Init request and Metadata request in multi-worker scenarios azure-functions-host#8825. Hopefully host can fix this

Workaround

As a workaround, users can explicitly set FUNCTIONS_WORKER_PROCESS_COUNT to 1 in their app settings

@ejizba
Copy link
Contributor Author

ejizba commented Jan 28, 2023

Addressed in #641 and Azure/azure-functions-host#8900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 v4 model 🚀 Related to the new V4 programming model
Projects
None yet
Development

No branches or pull requests

1 participant