问题
According to what David Ebbo said in the Azure runtime environment article, when you spin up 2 or more instances the files in the file system are moved to Azure Storage (Azure Blobs or Files) and are shared between all instances of the same Web Apps. Which means when a Web App Instance #1
create a Reamem.txt
file in the file system, a Web App Instance #2
can modify, remove etc. this file.
- Does Azure Web Apps really share disk between multiple instances?
- If yes, is there any way to change this behavior?
回答1:
- Yes. The website content is stored in a blob, which is then mounted by the instance. If there are multiple instances, they are backed by the same file system.
- You can't change this by default. You could however use multiple sites, but you would have to configure load balancing yourself. You could use traffic manager to do this.
来源:https://stackoverflow.com/questions/34889929/does-azure-web-apps-share-disk-between-multiple-instances