Closed ianb closed 6 years ago
This is happening, because there is a brief period of time where both versions are attached to the ELB. Nginx is configured to make a request to the site origin and cache that response: https://github.com/mozilla-services/cloudops-deployment/blob/master/projects/screenshots/puppet/modules/screenshots/templates/http_screenshots.conf.erb#L103
To fix temporarily, I could change site_origin to localhost and it would alleviate the problem, but the issue would return once we move over to Cloudfront.
Would it work to just flush the cache after each deploy, as part of the deploy pipeline? That way there would only be a minute or so where both versions of the code are being served.
@oremj I think that would work. Let's do it!
Opened an issue in our deployment repo to address this.
ok thanks. please let us know when it is closed
On our last deploy, references to the new code (with the
?rev=...
cachebust) still served up old code, until the CDN was flushed (which I think just means an nginx restart). That shouldn't happen!/cc @oremj