nayaread
HomeFavouritesTopicsSources
HomeFavouritesTopicsSources
NayaRead links to original engineering blogs. All copyright belongs to the respective authors.
Shopify Engineering·Jul 28, 2011·6 min read46

StatsD at Shopify - Shopify

Here at Shopify, we like data. One of the many tools in our data toolbox is StatsD. We've been using StatsD in production at Shopify for many months now, consistently sending multiple events to our StatsD instance on every request. What is StatsD good for? In my experience, there are two things that StatsD really excels at. First, getting a high level overview of some custom piece of data. We use NewRelic to tell us about the performance of our apps. NewRelic provides a great overview of our performance as a whole, even down to which of our controller actions are slowest, and though it has an API for custom instrumentation I've never used it. For custom metrics we're using StatsD. We use lots of memcached, and one metric we track with StatsD is cache hits vs. cache misses on our frontend. On every request that hits a cacheable action we send an event to StatsD to record a hit or miss.  Caching Baseline (Green: cache hits, Blue: cache misses)   Note: The graphs in this article were generated by Graphite, the real-time graphing system that StatsD runs on top of. As an example of how this is useful, we recently added some data to a cache key that wasn't properly converted to a string, so that piece of the key was appearing to be unique far more often than it was. The net result was more cache misses than usual. Looking at our NewRelic data we could see that performance was affected, but it was difficult to see exactly where. The response time from our memcached servers was still good, the response time from the app was still good, but our number of cache misses had doubled, our number of cache hits had halved, and overall user-facing performance was down. A problem   It wasn't until we looked at our StatsD graphs that we fully understood the problem. Looking at our caching trends over time we could clearly see

Read original on shopify.engineering

Score breakdown

  • Technical depth53
  • Practical value45
  • Originality100
  • Writing quality90
  • Source reputation0
  • Recency0
  • External engagement0
  • On-site engagement0

NayaRead shows a summary and links to the original article. The full article is hosted on shopify.engineering.

More like this

Etsy — Code as Craft

Reducing experiment duration with predicted control variates

Kelly McManus·Nov 25, 2025·8 min read
Shopify Engineering

IdentityCache: Improving Performance one Cached Model at a Time - Shopify

Apr 4, 2013·8 min read
Shopify Engineering

Improving Shopify App’s Performance - Shopify

Mar 5, 2024·10 min read
Shopify Engineering

Simplify, Batch, and Cache: How We Optimized Server-side Storefront Rendering - Shopify

Dec 10, 2020·14 min read