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)
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
| Assignee | ||
Updated•12 years ago
|
Component: Server → Operations: Deployment Requests
Product: Loop → Mozilla Services
| Assignee | ||
Comment 1•12 years ago
|
||
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)
Comment 2•12 years ago
|
||
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)
| Assignee | ||
Comment 3•12 years ago
|
||
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)
Comment 4•12 years ago
|
||
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)
| Assignee | ||
Comment 5•12 years ago
|
||
Okay, I'll add a makefile target there so that we're able to minify the files then.
Flags: needinfo?(alexis+bugs)
Updated•12 years ago
|
Whiteboard: [qa-]
Comment 6•12 years ago
|
||
> 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)
Comment 7•12 years ago
|
||
(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?
Comment 8•12 years ago
|
||
Oh well you are right. Then we may use Last-Modified header for index.html
| Assignee | ||
Updated•12 years ago
|
Assignee: tarek → alexis+bugs
Flags: needinfo?(alexis+bugs)
Comment 9•12 years ago
|
||
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
| Assignee | ||
Comment 10•12 years ago
|
||
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.
Description
•