The Importance of REST and Mobile (and how Instagram scales)
Posted by
Raj Bala on Wed, Jan 04, 2012 @ 12:05 PM
I read a post recently about Instagram, the mobile photo sharing phenomenon, written by their engineering team that describes how the service is built and how it scales. Instagram allows users to take photos on their mobile phones, add a filter to the image to change the appearance, upload it to the Instagram service and then share it on various social platforms such as Facebook and Twitter.
Instagram encountered many technical scaling issues early in the life of the application because of the incredible user and data growth. They're nearing 20 million users and 50 objects created a second. That sort of growth exposes a thorny set of issues that most platforms won't ever encounter. For instance simply creating a unique ID to track each object in a distributed system with that sort of volume becomes a challenge.
One of the most interesting parts of that post to me, unsurprisingly, was about how the actual photographs are stored.
Here's what they had to say:
"The photos themselves go straight to Amazon S3, which currently stores several terabytes of photo data for us."
In other words, an application server running in a compute instance isn't a gateway (or a bottleneck) to the storage layer. The Instagram app (on the iPhone perhaps) communicates directly with the storage layer using REST over the Internet.
It wouldn't work as well any other way.
RESTful webservices are fundamental to the mobile Internet because users themselves are more mobile now than ever. Traditional ways of thinking about storage are almost irrelevant in the mobile Internet particularly where unstructured data is concerned.
The design pattern of mobile apps that access RESTful webservices will not just continue, but it will increase.
HTTP is the language of the Internet, but particularly mobile apps. It's the protocol that apps want to speak. And it's why we built Atmos.
(Photograph of the MIT Stata Center in Cambridge, MA taken with Instagram)
blog comments powered by