Closed
Bug 1237456
Opened 8 years ago
Closed 5 years ago
support.mozilla.org marking font file as uncacheable
Categories
(support.mozilla.org :: Code Quality, task)
support.mozilla.org
Code Quality
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: cliang, Unassigned)
References
Details
In doing some log analysis, I found that an overwhelming number of hits for SUMO come from Edgecast [1] and are for a specific URL [2]. Is there a specific reason that we don't cache the MetaWebPro-Bold font file? (I suspect that things would be improved if we could set something like a 5 minute cache time for that file.) $ curl -v -o /dev/null https://support.mozilla.org/static/sumo/fonts/MetaWebPro-Bold.ff98af2fcd50.ttf?v=1 [...] > < HTTP/1.1 200 OK < Server: Apache < X-Backend-Server: support1.webapp.phx1.mozilla.com < Cache-Control: max-age=0 < Content-Type: application/octet-stream < Public-Key-Pins: max-age=1296000; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E="; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; < Date: Thu, 07 Jan 2016 00:01:54 GMT < Expires: Thu, 07 Jan 2016 00:01:54 GMT < Accept-Ranges: bytes < ETag: "5279387d34900" < Last-Modified: Wed, 23 Dec 2015 16:51:16 GMT < X-Cache-Info: not cacheable; response specified max-age <= 0 < Content-Length: 40924 [...] [1] For example, in one hour, the top 10 client IPs are: 1862 66.249.79.240 3730 63.158.132.10 3880 192.229.129.75 4716 68.180.229.56 5470 192.229.129.83 6895 192.229.129.25 6952 192.229.129.63 9649 93.189.83.15 16456 144.76.27.37 115857 192.229.129.20 [2] In one hour: 1 "GET /media/uploads/avatars/avatar-207964.png 1 "GET /media/uploads/gallery/images/2014-12-03-05-55-17-359874.png 1 "GET /media/uploads/images/2013-12-21-02-20-58-b7a0e0.png 1 "GET /static/css/landings/get-involved-min.css?build=1a839dd 115853 "GET /static/sumo/fonts/MetaWebPro-Bold.ff98af2fcd50.ttf?v=1
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(mcooper)
Comment 1•8 years ago
|
||
I suspect this is related to bug 1150592. We haven't be quite serving the right kind of headers with these files for a while. We have a fix for that in the pipe right now, so we should be able to say for sure if it is the same issue or not soon. Thanks for checking on this! This could definitely make the site faster. I suspect we could be even more aggressive with the caching and do at least a day, maybe upwards of forever.
Depends on: 1150592
Flags: needinfo?(mcooper)
Comment 2•8 years ago
|
||
Bug 1150592 is now resolved. I don't think this problem was fixed like I hope it would be. Is the solution for this something in the CDN that you need to to? Or is it something I can do with an .htaccess file?
Flags: needinfo?(cliang)
Reporter | ||
Comment 3•8 years ago
|
||
I think you can get the font file cached by changing the ./static/.htaccess file. There is a line in there that says: ExpiresByType application/octet-stream "access plus 0 seconds" If I issue a curl command for the font file directly against one of the webheads[1], which bypasses the load balancers, one of the headers returned is: Cache-Control: max-age=0 I believe the load balancer see that and that's why the header: X-Cache-Info: not cacheable; response specified max-age <= 0 ... is generated. I don't know having a very low max-age comes from a period before SUMO was version-ing its font files. [1] curl -v -o /dev/null -H 'Host: support.mozilla.org' https://support1.webapp.phx1.mozilla.com:81/static/sumo/fonts/MetaWebPro-Bold.ff98af2fcd50.ttf?v=1
Flags: needinfo?(cliang)
Comment 4•8 years ago
|
||
In that case, I think this is a sumodev bug, so I'm going to move this over to our side.
Assignee: server-ops-webops → nobody
Group: infra
Component: WebOps: Community Platform → Code Quality
Product: Infrastructure & Operations → support.mozilla.org
QA Contact: smani
Version: other → unspecified
Updated•8 years ago
|
Whiteboard: [kanban:https://webops.kanbanize.com/ctrl_board/2/2414] → u=ops p=1 [kanban:https://webops.kanbanize.com/ctrl_board/2/2414]
Updated•8 years ago
|
Assignee: rwatson → nobody
Updated•8 years ago
|
Whiteboard: u=ops p=1 [kanban:https://webops.kanbanize.com/ctrl_board/2/2414]
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•