The explosive success of the social networking service Pinterest wouldn't have been possible without the easy scalability of the Amazon cloud services, an executive for Pinterest said.
"The cloud has enabled us to be more efficient, to try out new experiments at a very low cost, and enabled us to grow the site very dramatically while maintaining a very small team," said Ryan Park, operations engineer for Pinterest, at the Amazon Web Services Summit, in New York Thursday.
With very little in the way of internal IT infrastructure, Pinterest was able to attract almost 18 million visitors by the month of March, a 50 percent increase from the previous month, according to Web ratings firm ComScore. The site has been one of the fastest growing sites in the history of the Web.
Because of Pinterest's use of the Amazon Web Services (AWS), "we've been able to grow the site so successfully with such a small team," Park said. As of last December, the social networking service employed only 12 people.
Pinterest's use of Amazon's S3 (Simple Storage Service) grew by a factor of 10 since last August. Its use of Amazon's EC2 (Elastic Cloud Compute) grew by a factor of 3 in that time frame. The company now has about 80 million objects stored in S3, which holds about 410 terabytes of user data.
"Imagine we were running our data center, and we had to go through a process of capacity planning and ordering and racking hardware. It wouldn't have been possible to scale fast enough," Park said.
Pinterest is an online pinboard, a service that allows people to collect and organize items of interest, so they can be viewed by others. The company uses a range of AWS services to run the site.
Today, Pinterest runs about 150 EC2 virtual servers, called instances, to run its core Web services, which are written in Python and use the Django framework. Traffic is balanced across these instances using the Amazon ELB (Elastic Load Balancer). "The ELB has a great API, so we can [programmatically] bring in more instances, or take instances out if they are having problems."
Another 90 EC2 instances are dedicated towards caching, through memcache. "This allows us to keep a lot of data [in memory] that is accessed very often, so we can keep load off of our database system," Park said. Another 35 instances are used for internal purposes.
Behind the application, Pinterest runs about 70 master databases on EC2, as well as another set of backup databases located in different regions around the world for redundancy.
In order to serve its users in a timely fashion, Pinterest sharded its database tables across multiple servers. When a database server gets more than 50 percent filled, Pinterest engineers move half its contents to another server, a process called sharding. Last November, the company had eight master-slave database pairs. Now it has 64 pairs of databases. "The sharded architecture has let us grow and get the I/O capacity we need," Park said.
Sign up for Computerworld eNewsletters.