Sign up FAST! Login

How Pinterest Added 70M Users Without Overhauling Its Original Codebase – ReadWrite


Stashed in: Pinterest, Software!, Scaling

To save this post, select a stash from drop-down menu or type in a new one:

We know this feeling:

It helps that the three engineers responsible for building Pinterest’s original codebase—Yash Nelapati, Marty Weiner and Ryan Probasco—still work there today, and can oversee the codebase’s lengthy history. 

According to Weiner, it wasn’t originally a conscious choice to retain the same codebase Pinterest had in early 2011, but one born out of necessity. 

“The site began moving and 2011 was spent in rapid-growth mode,” he said. “There was no time to think about a major re-architecture.  Every day was spent trying to fix the one or two things that were on fire for those 12 to 24 hours, and maybe get ahead on what we thought would break in the next 12 hours.”

It's hard enough to keep things running when your user base is growing rapidly.

I love that they're using old tried and true technologies rather than something bleeding edge:

But as tweaks built upon tweaks, Pinterest’s architecture became increasingly unscalable when faced with the site’s unrelenting growth. When they noticed these edits—cobbled together from a variety of technologies—were making the codebase unstable, they had two options. They could replace the codebase with other technical solutions. Or, they could rewrite and strengthen the original building blocks.

"We made a snap decision to put all the cards on the table and rethink," said Weiner. "We chose a few technologies that worked consistently well—MySQL, Python, Memcache, Redis and a few others. What we ended up with was a new beginning that we've evolved ever since."

Nobody can deny the sleek look Pinterest presents to users, but for developers trawling Pinterest’s storied codebase, there are certainly a few surprising ancient Easter Eggs.

“We still use invite code written in 2010,” said Weiner. “My favorite file still around is our original notes.txt file which was our ‘Apollo 13 checklist’ of how to bring up boxes or fix certain problems.”

The bleeding-est edge part of their stack is Redis, and Redis is pretty robust, we've found.

You May Also Like: