I use azure http functions written on java to handle different events based on webhooks.
Many of the configurations of these functions are stored in an azure app configuration, so we can dynamically change the configurations without restarting the function app. As a handler for the event I have an event grid triggered function which takes the new configurations from the app configuration only if a configuration modification event arrives ( Getting the configuration directly after every execution of the HTTP function is expensive ). This workflow works fine but the problem arrives, when we scale out the function app. Once there are more instances of the function app only one instance gets the event and changes the local configurations, all the other instances keep working with the old configurations.
Is there a way to make the scale controller distribute the event to all instances?
If a cache of the configurations is the best option, which azure resource would you take to make it less expensive?
Thanks in advance!
Tried sending more than one event on configuration change to the function app, but we have no guarantee that these events are equally distributed between the instances