-
Notifications
You must be signed in to change notification settings - Fork 470
Worker Indexing Changes
The goal of Project Stein is to shift the functions indexing responsibility from the host to the worker. Some changes were made to the host to enable this new role, so this wiki page will go over the details of what changes were made and why they were necessary.
At ScriptHost startup, the host requests for the worker to index the functions and send back the function metadata through WorkerFunctionMetadataProvider.
-
New metadata provider:
WorkerFunctionMetadataProvidercommunicates with the worker to get the function metadata. It also validates the received metadata before sending it back toFunctionMetadataManager -
New metadata provider factory:
FunctionMetadataProviderFactorywas created to provide a specific metadata provider toFunctionMetadataManagerdepending on if the host was indexing or if the worker was indexing. Also, to make the distinction between each type of metadata provider more clear, the originalFunctionMetadataProvider.csfile was renamed toHostFunctionMetadataProvider. -
Edited
FunctionMetadataManagerconstructor: added the metadata provider factory to the constructor for later use inLoadFunctionMetadata(getting the appropriate provider and callingGetFunctionMetadataon it). -
New GRPC message types:
FunctionsMetadataRequest,FunctionMetadataResponsesFunctionsMetadataRequestsends the function app directory to the worker.FunctionMetadataResponsesincludes a list ofFunctionLoadResponsemessages and an overallStatusResultattribute. Each of theseFunctionLoadResponsemessages contains the function ID and correspondingRpcFunctionMetadatamessage. -
Added new initialization code path to
RpcFunctionInvocationDispatcher: new functions break up the originalInitializeAsynclogic to allow the host to send theWorkerMetadataRequestin the middle of the channel initialization process. The logic also needed to be broken up because the invocation buffers and invocation requests can only be made once the host has metadata to operate with. -
Added feature flag,
FeatureFlagEnableWorkerIndexing, in front of new worker indexing code path -
Added utility function
Utility.CanWorkerIndex(RpcWorkerConfig workerConfig)to check to see if the worker can index or not. It returns true if the feature flag is enabled and theworker.config.jsonfile states that the worker can index. Otherwise, it returns false.
- Configuration Settings
- function.json
- host.json
- host.json (v2)
- Http Functions
- Function Runtime Versioning
- Official Functions developers guide
- Host Health Monitor
- Managing Connections
- Renaming a Function
- Retrieving information about the currently running function
- Site Extension Resolution
- Linux Consumption Regions
- Using LinuxFxVersion for Linux Function apps
- Out-of-proc Cancellation Tokens
- Assembly Resolution in Azure Functions
- ILogger
- Precompiled functions
- Official Functions C# developer reference
- Contributor Onboarding
- Development Process
- Deploying the Functions runtime as a private site extension
- Authoring & Testing Language Extensions
- Bindings in out-of-proc
- Language Extensibility
- Worker Capabilities
- Investigating and reporting issues with timer triggered functions not firing
- Sharing Your Function App name privately
- Azure Functions CLI release notes [moved here]
- Function App Zipped Deployment [deprecated]