January 2013
1 post
Handling Growth with Postgres: 5 Tips From...
As we’ve scaled Instagram to an ever-growing number of active users, Postgres has continued to be our solid foundation and the canonical data storage for most of the data created by our users. While less than a year ago, we blogged about how we “stored a lot of data” at Instagram at 90 likes per second, we’re now pushing over 10,000 likes per second at peak—and our...
Jan 17th
97 notes
May 2012
1 post
redis-faina: a query analysis tool for Redis
As we mentioned in our previous blog, we’re big fans of tools and techniques for introspecting our live traffic to see what exactly is going on. One tool we use frequently is PGFouine, a query traffic analyzer for PostgreSQL. We recently found that we also needed a similar tool for Redis, our swiss-army-knife list/set/etc storage. We call it redis-faina and we’re making it open source so...
May 16th
31 notes
April 2012
1 post
Keeping Instagram up with over a million new users...
On Tuesday we launched Instagram for Android, and it’s had a fantastic response so far. The last few weeks (on the infrastructure side) have been all about capacity planning and preparation to get everything in place, but on launch day itself the challenge is to find problems quickly, get to the bottom of them, and roll out fixes ASAP. Here are some tools & techniques we used to tackle...
Apr 5th
189 notes
December 2011
1 post
What Powers Instagram: Hundreds of Instances,...
One of the questions we always get asked at meet-ups and conversations with other engineers is, “what’s your stack?” We thought it would be fun to give a sense of all the systems that power Instagram, at a high-level; you can look forward to more in-depth descriptions of some of these systems in the future. This is how our system has evolved in the just-over-1-year that we’ve been live, and while...
Dec 3rd
1,344 notes
November 2011
2 posts
Instagram Engineering Challenge: The Unshredder
In our office, we have a pretty amazing paper shredder. Seriously, the thing shreds just about anything. It even has a special slot for credit cards (why anyone would want to regularly shred credit cards is beyond me, but I digress…). One day, after shredding some paper, I thought to myself: shredding paper is a pretty insecure way of destroying important stuff. I figured,...
Nov 11th
521 notes
Storing hundreds of millions of simple key-value...
When transitioning systems, sometimes you have to build a little scaffolding. At Instagram, we recently had to do just that: for legacy reasons, we need to keep around a mapping of about 300 million photos back to the user ID that created them, in order to know which shard to query (see more info about our sharding setup). While eventually all clients and API applications will have been updated to...
Nov 1st
159 notes
October 2011
1 post
Simplifying EC2 SSH Connections
Here at Instagram, we run our infrastructure on Amazon Web Services, running instances on their Elastic Compute Cloud (EC2). Since we’re often spinning up new machines and changing details of our infrastructure, there’s an ever-growing list of machines that we SSH into. To authenticate with our instances, we use public key authentication (the recommended way of doing SSH log-ins to...
Oct 13th
121 notes
September 2011
1 post
Sharding & IDs at Instagram
With more than 25 photos & 90 likes every second, we store a lot of data here at Instagram. To make sure all of our important data fits into memory and is available quickly for our users, we’ve begun to shard our data—in other words, place the data in many smaller buckets, each holding a part of the data. Our application servers run Django with PostgreSQL as our back-end database. Our...
Sep 30th
3,286 notes