# Doing the right thing

DevFeed: [Doing the right thing](<https://devfeed.tech/articles/doing-the-right-thing-2029.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//doing-the-right-thing>)

Published: 2011-08-24T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Rails](<https://devfeed.tech/topics/rails.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Caching](<https://devfeed.tech/topics/caching.md>)

Tags: [activerecord](<https://devfeed.tech/tags/activerecord.md>), [cache](<https://devfeed.tech/tags/cache.md>), [database](<https://devfeed.tech/tags/database.md>), [index](<https://devfeed.tech/tags/index.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [operations](<https://devfeed.tech/tags/operations.md>), [orm](<https://devfeed.tech/tags/orm.md>), [outage](<https://devfeed.tech/tags/outage.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [rails](<https://devfeed.tech/tags/rails.md>)

## AI overview

The article analyzes a SoundCloud outage caused by multiple Rails and MySQL interactions in which people followed established practices. It discusses cache keys based on updated_at, ActiveRecord touch behavior, counter caches for efficient counts, and dependent destruction callbacks, showing how idiomatic Rails patterns can have severe operational consequences at scale.

## Source excerpt

The recent outage of SoundCloud was the result of everybody doing the right thing. This totally jives with John Allspaw's message that...