Closed Bug 1023217 Opened 12 years ago Closed 12 years ago

Investigate CloudFront for loop-client deployment

Categories

(Cloud Services :: Operations: Deployment Requests - DEPRECATED, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: tarek, Assigned: alexis+bugs)

Details

(Whiteboard: [qa-])

loop-client is currently deployed on our loop server nginx. Let's investigate using CloudFront for this
Component: Server → Operations: Deployment Requests
Product: Loop → Mozilla Services
I've changed the component and product for this bug as I think that's a deployment thing. Benson, I let you look at how to host this with CloudFront (or any other CDN).
Flags: needinfo?(bwong)
Before putting any CDN in front loop-client should at least: - minify and concat .js and .css files - use some cache busting strategy, compile out unique filenames for .css/.js files ie: main_a3afe.js for every unique version Once these are done we can set cache-control headers for 1 year and edge caches like cloudfront would be much more effective at delivering the content faster. For the main index.html, this should have a short cache lifetime or no-cache.
Flags: needinfo?(bwong)
Do you need someone to do the minification? I believe this should be automated in the deployment process. Let's go for cache busting using random hashes :)
Flags: needinfo?(bwong)
The minification would be part of the RPM build process, so compiled resources aren't source controlled. I suggested using grunt to do it. This is exactly how we deploy fxa-content-server. Ideally the hash should be of the contents. That way if the contents do not change the cached resources are still valid. Ultimately it won't make that much difference either way.
Flags: needinfo?(bwong)
Okay, I'll add a makefile target there so that we're able to minify the files then.
Flags: needinfo?(alexis+bugs)
Whiteboard: [qa-]
> For the main index.html, this should have a short cache lifetime or no-cache. Benson can you elaborate why? IMHO we should use the same strategy (cache busting)
(In reply to Rémy Hubscher (:natim) from comment #6) > Benson can you elaborate why? IMHO we should use the same strategy (cache > busting) index.html is served as /. how do we cache bust that?
Oh well you are right. Then we may use Last-Modified header for index.html
Blocks: 1024640
No longer blocks: 1024640
Assignee: tarek → alexis+bugs
Flags: needinfo?(alexis+bugs)
I would delay the decision to use a CDN (we don't use one in FxA currently). We could start with just serving the loop web client from a nginx server. The other work discussed here is still relevant: minification, cache busting URLs, headers, etc. It would be nice to have some parity between what FxA does and Loop. We use grunt to automate tasks, e.g., here's our build task: https://github.com/mozilla/fxa-content-server/blob/master/grunttasks/build.js
I'm closing this bug for now as invalid since we don't want to do caching for now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.