shlogg · Early preview
Seth Orell @setho

Software Engineering Mistakes: Avoiding Aggregations For Scalability

Aggregations like count() & avg() can bring down your database as data grows. They're time bombs that can crater at any moment, making it hard to scale predictably. Use DynamoDB or avoid aggregations for a scalable system.

Part One

  
  
  Plot spoiler

As I mentioned in the introductory article to this series, the secret to cratering your database is to do things that don't scale and then try to scale. In this article, we'll discuss aggregations, one of the most common non-scalable actions you can perform with your database.
The operations count, avg, min, and max are all aggregation functions. Most SQL (and many NoSQL) databases support aggregations. Some databases, like AWS DynamoDB, do not.
I routinely hear engineers complain1 about DynamoDB's lack of built-in aggregations. This article stresses, "It's on p...