Strava Engineering Blog, published 2014-07-30 (Read from an Internet Archive copy captured on 2015-09-06; the original address answered HTTP 404 when fetched on 2026-12-02.)
Architecture
Processing an upload identifies and stores several time-indexed streams of data (location, distance, speed and so on). The stream data is stored on Amazon S3; metadata saying which streams belong to an activity is a table in a database, each row with an auto-incrementing identifier. Uploads are processed by background jobs.
Section: What Happened | Near: but with all background job processing disabled
Figures, as the source states them
Figure
As stated
Note
Where
Upper limit of the table's auto-incrementing identifier
2,147,483,647 identifier value
One table; top of the positive range of a four byte signed integer, not a row count
An auto-incrementing signed integer key ran out on a table with no keyspace monitoring
strava-2014-upload-outage#f1at corpus version 26a1b3a7e3dd
Trigger
At 15:10 PDT on Tuesday, July 29 the auto-incrementing identifier of the stream metadata table, stored as a four byte signed integer, hit its upper limit of 2147483647, and insertions into the table started failing.
Section: What Happened | Near: Starting Tuesday, July 29 at approximately 15:10 PDT
How it failed
Processing an upload stores rows in that table to record which streams belong to the activity. With inserts failing, every upload to Strava failed for a period of about 35 minutes, until the team found the root cause and put the site into maintenance mode.
Section: What Happened | Near: For a period of about 35 minutes
Why defences did not hold
Normally the team would have had weeks of advance notice of this kind of issue, and it had run many such migrations before, but keyspace monitoring was not in place for this particular database.
Section: What We’re Doing
Impact
Uploads were disrupted for almost 14 hours. All uploads failed for about 35 minutes; the site was in maintenance mode until 16:10 PDT, then ran with background job processing disabled, so uploads were captured but not processed. The fix landed early on Wednesday morning, and the captured uploads had all been processed by 7:00 PDT.
Near: Starting Tuesday, July 29 at approximately 15:10 PDT
Fix
The identifier was changed from signed to unsigned by a migration on a fresh database slave, then a failover to it. An audit of all primary keys is done and more monitoring is in place. In progress: better outage communications and a site showing Strava's availability. Planned: change the remaining signed integer primary keys to unsigned ahead of need, review keyspaces routinely, and review the ability to control failing uploads, which the team says must be instant and selective.
Section: What Happened | Section: What We’re Doing
Keep accepting uploads but switch off their processing while the table was fixed
strava-2014-upload-outage#d1at corpus version 26a1b3a7e3dd
Chosen
The site was brought back with all background job processing disabled: uploads were captured but not processed until the underlying problem was fixed, and most interactive parts of the site worked.
Near: but with all background job processing disabled
Rejected
Keep the site down entirely.
Near: ranging from keeping the site down entirely
Emergency code changes.
Near: to emergency code changes to messing around
Messing around with database internals.
Near: to emergency code changes to messing around
What forced it
Inserts into the stream metadata table were failing, which blocked normal upload processing while the team worked on a repair.
Section: What Happened
Reasoning
The team felt this approach carried the least risk while still letting the site stay generally operational during the fix.
Near: carried the least amount of risk while still
Cost
All background job processing was switched off, so uploads were captured but sat unprocessed until the table was fixed. The post says the team had only an overly broad way of disabling uploads.
Near: but with all background job processing disabled | Near: we only have an overly broad way
Outcome
The site came back into production at 16:10 PDT. All captured uploads had been processed by 7:00 PDT on Wednesday.