I have been experimenting with slot warm up settings using "WEBSITE_SWAP_WARMUP_PING_PATH" app service configuration as suggested in Ruslan's blog. Unfortunately, I don't see it working the way I would expect. My expectation is that the slot swap operation would fail if the status code listed in "WEBSITE_SWAP_WARMUP_PING_STATUSES" did not match the "WEBSITE_SWAP_WARMUP_PING_PATH" response code. I went as far as hard-coding a 500 status code in my warm-up path but the slot swaps continue to complete successfully.
Shouldn't an unmatched status code prevent the slot swap?
Here is my controller action:
public class HomeController : Controller
{
...
public IActionResult Warmup()
{
return new StatusCodeResult(500);
}
Here are my App Service Configuration Settings
{
"name": "WEBSITE_SWAP_WARMUP_PING_PATH",
"value": "/home/warmup",
"slotSetting": true
},
{
"name": "WEBSITE_SWAP_WARMUP_PING_STATUSES",
"value": "200",
"slotSetting": true
},
Edit: I even took it a step further and completely removed the action. The application should now return a 400. However, when I turn on request tracing I can see that I am actually getting a 307.