To both your questions: the answer is yes and yes.
To explain, whenever Netlify publishes a deploys, it asks all of its CDN nodes to invalidate and purge the old cache - so that all the users of the websites would see the latest changes instead of the version cached by our CDN (this is different from browser and service-worker cache, that cache cannot be controlled by Netlify).
So, when you deploy frequently, the pages are dropped from our CDN cache. As soon as the page is requested for the first time from a CDN node, it then gets cached in that node. Any further request in a limited time span, served by that node would be faster. Here’s some additional context about how CDN cache at Netlify works:
So to sum up, adding a new deploy removes the cache from all nodes, but the new pages won’t be cached till it’s requested again.
As far as the answer to the question can you do something about it goes, I believe if you need to deploy that frequently, there’s nothing you can do and rather there is nothing you should do. If you try, your users would get a stale page from the cache.
Thanks for the feedback!
We indeed notice higher response times based on the amount of deploys.
We will ask our customer to batch the content publishing.
Could you give us some more details on why the response times fluctuate?
We have gated content running using _redirects file, based on roles. When we disable those redirects the response time is way better, sometimes 2 to 3 times.
Can we improve something or is this the way it is?
Ah, basic auth? Thanks for sharing that info, because with basic-auth (or site-wide password protection) all requests go to our west-coast US origin server as every request needs to be authenticated. If you require password protection in production but would like your requests to utilise our CDN, you could achieve this by using JWTs. Removing basic-auth/site-wide password protection will allow your site to utilise our CDN.
It’s interesting that you’re seeing slower loads with JWT itself. Could we check it from our side? We would need an account on your Identity instance. You could create a test account and share its ID and password.
Update here: after further testing, we have established that removal of the redirects file has some impact on response time, but not as drastic as we thought.