You manage an Azure App Service web app named WebApp1 that has a deployment slot named Staging. WebApp1 currently connects to a production database, and Staging connects to a testing database. The database connection settings are stored as an application setting named DB_CONNECTION.
You need to ensure that when Staging is swapped to production, the production slot continues to connect to the production database and the Staging slot continues to connect to the testing database.
Which configuration should you apply?
- AUpgrade the App Service Plan pricing tier to Premium V3 to enable multi-slot configuration synchronization.
- BConfigure an autoscale rule to dynamically modify the DB_CONNECTION setting based on slot status.
- Configure the DB_CONNECTION setting as a deployment slot setting in both WebApp1 and Staging.Cevap
- DConfigure an Azure Monitor alert action group to run an automation runbook that rewrites the settings after every swap.
Cevap
Configure the DB_CONNECTION setting as a deployment slot setting in both WebApp1 and Staging.
The correct option is correct because configuring a setting as a deployment slot setting (also known as a slot-sticky setting) pins that specific configuration to the slot. When the deployment slots are swapped, the app code and most configurations are exchanged, but settings marked as deployment slot settings remain unchanged in their respective slots. This ensures the production slot continues pointing to the production database, and the Staging slot continues pointing to the testing database.
Adım Adım Çözüm
Anahtar Kavram
App Service Deployment Slot Settings (Sticky Settings)
Tahmini Süre:1m 30s