Greets! I have a piece of OSS (rails) I’ve inherited and it’s configurations seem a bit odd. And I’m also not sure it’s even doing anything. Let’s start with the Fastly configs for our static assets.
I want to achieve optimal performance from caching. As a reference I pings an image from fastly.com
https://www.fastly.com/sites/default/files/fastly_logo.png -> 136ms
Pretty quick, not bad, right? Presumably the people at Fastly indeed trust their service enough to use it on their home page
Now let’s move on to speed testing the OSS image served by Fastly:
https://act.s.eff.org/uploads/0020c606c08d49e3bca109395a08b659/airship-banner.jpg -> 415ms
Oh noez, that’s not as fastly as the Fastly one
Let’s test the backend directly:
https://s3-us-west-1.amazonaws.com/actioncenter/uploads/0020c606c08d49e3bca109395a08b659/airship-banner.jpg -> 458ms
That number is ~50ms slower than going through Fastly.
My assumption is that when I request the asset from Fastly, Fastly then immediately requests it from S3, waits for S3 to finally serve it up, and then finally Fastly serves it back to me. How do I test this hypothesis and correct the problem?
Edit: These tests are done in firefox with the ‘disable cache’ checkbox ticked to simulate a user’s first browse of the app. The
net panel’s response times are what I used for speed testing.
Please sign in to leave a comment.