1

I would like to build an Azure function app that contains some minimalistic set of a state. A setting or two, or cached items.

I would like for another application to somehow trigger all the app service instances to update their state - be it using webhooks, servicebus or whatnot. The obvious question is how can I send a message to ALL instances, and not just one?

...or is there another architecture that is recommended?

WPFUser
  • 403
  • 4
  • 16
  • you can use eventgrid or servicebus: Create a topic, Create a subscription for each instance. When you push a event to your topic, each instance will be notified. – Thomas Sep 12 '18 at 21:45
  • @Thomas : The number of instances scales with the workload of the azure function app. Also it is as far as I know not possible to select which instance should handle which queue - the point is that it scales, isn't it? – WPFUser Sep 13 '18 at 07:28
  • Oh sorry, I haven't read the question properly... You can store your configuration inside an azure storage table so if you update the settings it will be reflected in each instance (latency should be very small inside the same datacenter: less than 10ms) or you can update function app settings programmatically so It will be reflected in all instances. I think you can do it throught powershell, ARM template, for sure c# (https://stackoverflow.com/questions/23874503/change-azure-website-app-settings-from-code/34147652#34147652) – Thomas Sep 13 '18 at 07:38
  • I believe my question was a bit unclear. It is not appsettings I am trying to change, rather something that changes runtime - settings that relates to how to treat incoming messages. If I store something in an Azure table storage how do I notify the other instances to load it from there? – WPFUser Sep 13 '18 at 10:17
  • you can retrieve the value anytime you need it rather than caching it, storage table has a very low latency. – Thomas Sep 13 '18 at 10:40
  • Good point @Thomas – WPFUser Sep 16 '18 at 18:37

0 Answers0