App Services: Send Message to all instances of an app in the app pool
Lets say I have a Function App running in App Services and it has 1-5 instances of the app at any given time (based off scale settings). Our application is not big enough to warrant a Redis Cache so we have been using local caching but when certain changes are made we want to let all the instances know to refresh that part of the cache but when we send a message to the function app only 1 instance will receive the message and it takes sending the message 20+ times to ensure that all instances have received it. Is there a way to make sure the message is received by all instances of the app?
Suggestion, why not use a shared storage where a file would reside and it would compare the last time it was "touched" with another local file?
If a function modifies what's in the cache it does a "touch" on the remote file followed by the local file.
If a function needs to access the cache it checks if its local file is "younger" than the remote file, if that is the case it can use its cache. Otherwise, it updates itself.
There might be cleaner ways to do it but that's my 2 cents suggestion.
Sign in to comment