Reputation: 5467
I'm seeing some interesting behavior on Azure App Service that I'm hoping somebody will be kind enough to comment on.
Reproduction steps (all Azure steps can be done in the portal):
mysite
mysite-staging
mysite
with a file /scripts/test.js that has the content //ONE
mysite-staging
with a file /scripts/test.js that has the content //TWO
mysite.azurewebsites.net/scripts/test.js
and monitor the returned content during the swap operation (by continually doing a force-refresh in the browser)What I would expect to see:
//ONE
to //TWO
What I actually see:
//ONE
and //TWO
. After the swap operation is complete, the behavior is stable and //TWO
is consistently returnedThe observed behavior suggests that there is no single point in time at which all traffic can be said to be going to the new version.
The reason this concerns me is the following scenario:
mycdn.com/scripts/test.js?v2
(the ?v2
is a new query string)mysite.azurewebsites.net
. This time, the "bouncing" causes the response to be the v1 version of the script. My question: Is this "bouncing" behavior during a swap operation "by design"? If so, what is the recommended approach for solving the pathological case above?
Upvotes: 4
Views: 244
Reputation: 894
The behavior you've described is currently by design. When we perform the swap we update the mappings between hostnames and the sites in our database but our frontend instances cache those mappings and refresh them every 30 seconds. So the "bouncing" period may last up to 30 seconds.
I do not have at the moment a good recommendation on how to solve the case, but will look into possible ways to address this.
Upvotes: 3