Skip to content

Support multiple worker scenario in new framework #638

@ejizba

Description

@ejizba

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

Metadata

Metadata

Assignees

Labels

P1v4 model 🚀Related to the new V4 programming model

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions