appsembler / configuration

a simple, but flexible, way for anyone to stand up an instance of the edX platform that is fully configured and ready-to-go
GNU Affero General Public License v3.0
14 stars 13 forks source link

Increase edxapp staticfiles cache timeout to 30 days to improve performance #361

Closed OmarIthawi closed 3 years ago

OmarIthawi commented 3 years ago

RED-1961.

OmarIthawi commented 3 years ago

does it still make sense to have the hostname as part of the key prefix? it seems like we'd want all the servers to be using the same cache prefix?

Good question @thraxil. It does make sense, to hopefully support a rolling deployment.

Right now the S3 setup risks breaking the rolling deployment in terms of having no static files ready, but that's something we'll know for sure once we start deploying.

thraxil commented 3 years ago

@OmarIthawi if the random number or a revision id is set during the deploy, that handles a rolling deployment just fine.

Eg, if they are all set to the key prefix of "000" and then a deploy starts, edxapp0 gets its prefix updated to "001", edxapp1 and edxapp2 are continuing to handle requests and using "000" as their prefix. Then edxapp1 gets updated to "001", etc. The only difference in this scenario vs where they key prefix is "edxapp0-000", "edxapp1-000", and "edxapp2-000" getting updated to "edxapp0-001", "edxapp1-001", and "edxapp2-000" is that once the deploy is complete those servers all still have independent caches.

OmarIthawi commented 3 years ago

@OmarIthawi if the random number or a revision id is set during the deploy, that handles a rolling deployment just fine.

Eg, if they are all set to the key prefix of "000" and then a deploy starts, edxapp0 gets its prefix updated to "001", edxapp1 and edxapp2 are continuing to handle requests and using "000" as their prefix. Then edxapp1 gets updated to "001", etc. The only difference in this scenario vs where they key prefix is "edxapp0-000", "edxapp1-000", and "edxapp2-000" getting updated to "edxapp0-001", "edxapp1-001", and "edxapp2-000" is that once the deploy is complete those servers all still have independent caches.

Looking back at this, the host name isn't needed. I just kept it because that's what upstream had.