Set SNIPPET_HTTP_MAX_AGE to 10 minutes on snippets.mozilla.com

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mkelly, Assigned: cliang)

Tracking

Details

(Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/1126] )

(Reporter)

Description

4 years ago
Hi! We'd like to change the SNIPPET_HTTP_MAX_AGE setting on snippets.mozilla.com from 300 to 600. Thanks!

Updated

4 years ago
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/1126]
(Assignee)

Updated

4 years ago
Assignee: server-ops-webops → cliang
(Assignee)

Comment 1

4 years ago
I've added the lines listed below to local.py, pushing out the change to the dev and staging environments.  Please let me know if the changes that I made are acting as expected before I push them out to production.  

# bug 1058748
# Snippets-specific caching
SNIPPET_HTTP_MAX_AGE = 90  # Time to cache HTTP responses for snippets.
(Reporter)

Comment 2

4 years ago
(In reply to C. Liang [:cyliang] from comment #1)
> I've added the lines listed below to local.py, pushing out the change to the
> dev and staging environments.  Please let me know if the changes that I made
> are acting as expected before I push them out to production.  
> 
> # bug 1058748
> # Snippets-specific caching
> SNIPPET_HTTP_MAX_AGE = 90  # Time to cache HTTP responses for snippets.

Dev and stage both have a maxage matching the setting, so they're good. Prod is going to have 600 instead of 90 when you update it though, right? Just wanted to make sure I'm not misunderstanding. :D
(Assignee)

Comment 3

4 years ago
My bad with the cut and paste for dev and stage.  I didn't see any SNIPPET_HTTP_MAX_AGE setting in the local.py for those environments and copied the line out of local.py-dist.

I've changed SNIPPET_HTTP_MAX_AGE from 300 to 600 in production and pushed that change out:

$ diff ~/local.py /data/snippets/src/snippets.mozilla.com/snippets/settings/local.py
81c81,82
< SNIPPET_HTTP_MAX_AGE = 300
---
> # bug 1058748 - upped from 300 to 600
> SNIPPET_HTTP_MAX_AGE = 600

Comment 4

4 years ago
Just to filling a blank for anyone watching this, Zeus is already set with a max-age maximum of 6 hours for snippets.mozilla.com, so nothing needs to be changed there to get the benefit of this 300->600 increase. I do see assets being cached in Zeus for up to 10min now, so it does appear to be working. I don't have stats from before the change, but right now the Zeus hit rate is around 95-97%.
(Reporter)

Comment 5

4 years ago
Snippets is sending a matching max-age, so we're good here. Thanks!
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.