Keeping Up
Keeping Up
Almost two million new users from around the world sign up for Facebook each week—and we couldn't be happier. It's tremendously rewarding to see so many people find what we work on useful and fun. As we continue to add new users and features, however, the load on our thousands of servers continues to increase at a pretty astounding rate. A few weeks ago we reached full capacity in our California datacenters. In the past we handled this problem by purchasing a few dozen servers, hooking them up, and getting on with our lives, but this time we didn't have it so easy. We'd actually run out of space in our datacenters for new machines.
Fortunately we saw this problem coming a long time ago and started work on a new datacenter in Virginia. Now, we identify whether a user would be better off talking to the east coast datacenter or a west coast data center. For people in Europe and the eastern half of the US, it's noticeably faster to talk to a server in Virginia than in California. For these users we direct them to Virginia whenever they're browsing the site and not making any changes.
Whenever that person goes to change some data—uploading a photo album, or changing profile info for example—we send them off to California so that all our modifying operations happen in the same location. This decision was made to prevent two or more modifications from conflicting with each other and messing up our data. It might sound like we're forcing our users to go to California a lot but only about 10% of our traffic causes a modifying operation. MySQL has a great replication feature that allows us to, in real time, stream all the modifications happening on a California MySQL server to another one in Virginia. Replication happens so fast, even across the country, that the Virginia servers are almost never more than one or two seconds behind the California servers.
Even though all of the modification happens in California and streams instantly to Virginia, we were faced with another problem. Although Facebook's data is stored in MySQL database servers, we use a large number of memcached servers to store copies of the data. Memcached is much faster and able to keep up with requests quicker than the databases themselves can keep up. We had to figure out a way for memcached servers to replicate data concurrently with the MySQL databases. Because of various technical limitations of our architecture there was no easy way to do so.
Fortunately MySQL is open source software, meaning we can actually change the way it works by modifying the code. We did just that—embedding extra information in to the MySQL replication stream that allows us to properly update memcached in Virginia. This ensures that the cache and the database are always in sync. Over the last seven months a great team of Facebook employees has been building new software and setting up new servers like I described above. Over Thanksgiving we finally flipped the switch and since then almost 30% of our traffic has been served from Virginia.
The east coast datacenter is a great first step towards keeping Facebook fast and reliable as the site grows. Going forward we have lots of exciting plans to expand our infrastructure and improve performance so no user ever has to sit around waiting for a page to load.
Jason, a Facebook engineer, is all about the east coast.
Fortunately we saw this problem coming a long time ago and started work on a new datacenter in Virginia. Now, we identify whether a user would be better off talking to the east coast datacenter or a west coast data center. For people in Europe and the eastern half of the US, it's noticeably faster to talk to a server in Virginia than in California. For these users we direct them to Virginia whenever they're browsing the site and not making any changes.
Whenever that person goes to change some data—uploading a photo album, or changing profile info for example—we send them off to California so that all our modifying operations happen in the same location. This decision was made to prevent two or more modifications from conflicting with each other and messing up our data. It might sound like we're forcing our users to go to California a lot but only about 10% of our traffic causes a modifying operation. MySQL has a great replication feature that allows us to, in real time, stream all the modifications happening on a California MySQL server to another one in Virginia. Replication happens so fast, even across the country, that the Virginia servers are almost never more than one or two seconds behind the California servers.
Even though all of the modification happens in California and streams instantly to Virginia, we were faced with another problem. Although Facebook's data is stored in MySQL database servers, we use a large number of memcached servers to store copies of the data. Memcached is much faster and able to keep up with requests quicker than the databases themselves can keep up. We had to figure out a way for memcached servers to replicate data concurrently with the MySQL databases. Because of various technical limitations of our architecture there was no easy way to do so.
Fortunately MySQL is open source software, meaning we can actually change the way it works by modifying the code. We did just that—embedding extra information in to the MySQL replication stream that allows us to properly update memcached in Virginia. This ensures that the cache and the database are always in sync. Over the last seven months a great team of Facebook employees has been building new software and setting up new servers like I described above. Over Thanksgiving we finally flipped the switch and since then almost 30% of our traffic has been served from Virginia.
The east coast datacenter is a great first step towards keeping Facebook fast and reliable as the site grows. Going forward we have lots of exciting plans to expand our infrastructure and improve performance so no user ever has to sit around waiting for a page to load.
Jason, a Facebook engineer, is all about the east coast.
Most Popular Stories
المفضلة للفيسبوك
المواد المؤرشفة بناءً على الموضوع
Abuse (3)
Advertising (4)
Applications (12)
Chat (3)
Comments (2)
Credits (1)
Data Centers (1)
Education (2)
Events (2)
Facebook Tips (5)
Family (1)
Fan Box (1)
fbFund (1)
Filters (1)
Friend Lists (3)
Friends Page (1)
Games (3)
Gifts (4)
Groups (6)
Growth (7)
Guest blog (23)
Hackathon (2)
Help Center (1)
Home Page (1)
Inbox (1)
Language (7)
Live Feed (5)
Marketplace (1)
Memology (1)
Mobile (3)
Music (3)
News Feed (13)
Notifications (5)
Pages (21)
Parents (6)
Payments (2)
Phishing (2)
Photos (5)
Platform (6)
Privacy (15)
Prototypes (1)
Publisher (3)
Relationships (1)
Religion (1)
Research (4)
Safety (2)
Search (4)
Security (8)
Share (1)
Spam (3)
Sports (1)
Status Updates (5)
Suggestions (2)
Tagging (1)
Television (1)
Toolbar (1)
Translation (5)
Username (2)
Video (1)
Your Stories (12)
المنشورات المؤرشفة بحسب التاريخ
2010
فبراير (6)
يناير (11)
2009
ديسمبر (14)
نوفمبر (12)
أكتوبر (17)
سبتمبر (10)
أغسطس (10)
يوليو (10)
يونيو (13)
مايو (13)
أبريل (13)
مارس (14)
فبراير (13)
يناير (8)
2008
ديسمبر (15)
نوفمبر (14)
أكتوبر (12)
سبتمبر (9)
أغسطس (2)
يوليو (3)
يونيو (6)
مايو (5)
أبريل (6)
مارس (2)
فبراير (4)
يناير (3)
2007
ديسمبر (4)
نوفمبر (4)
أكتوبر (1)
سبتمبر (3)
أغسطس (4)
يوليو (4)
يونيو (2)
مايو (5)
أبريل (9)
مارس (8)
فبراير (7)
يناير (4)
2006
ديسمبر (3)
نوفمبر (6)
أكتوبر (5)
سبتمبر (7)
أغسطس (4)
المنشورات المؤرشفة بحسب Blogger
Abraham Cooper (1)
Adam Conner (4)
Adam Hupp (1)
Aditya Agarwal (2)
Akhil Wable (1)
Alex Moskalyuk (1)
Ana Muller (1)
Annie Ta (2)
Ari Steinberg (2)
Arjun Banker (1)
Austin Haugen (1)
Barry Schnitt (1)
Benjamin Ling (1)
Blair Heuer (1)
Blake Chandlee (1)
Bo Hong Deng (1)
Bob Trahan (2)
Brian Shire (1)
Brynn Shepherd (1)
Cameron Marlow (1)
Carolyn Abram (11)
Casi Lumbra (1)
Cat Lee (3)
Chad Little (2)
Chengos Lim (1)
Chris Cox (2)
Chris Hughes (2)
Chris Kelly (4)
Chris Putnam (4)
Chris Ward (1)
Craig Donato (1)
Dan Rose (1)
Daniel Chai (1)
Danna Gutman (1)
Dave Fetterman (1)
Dave Morin (1)
Doug Beaver (2)
Elliot Schrage (2)
Eric Kwan (2)
Eric Zamore (1)
Ethan Beard (1)
Evan Priestley (1)
Ezra Callahan (8)
Florin Ratiu (1)
Gareth Davis (1)
Gene Fant (1)
Ghassan Haddad (1)
Gibson Biddle (1)
Graeme Menzies (1)
Greg Badros (1)
Jack Lindamood (1)
Jackie Kong (1)
Jake Brill (2)
James Wang (2)
Jared Cohen (1)
Jason Min (2)
Jason Sobel (1)
Jeff Kanter (1)
Jeff Williams (1)
Jesse Dwyer (1)
Jimmy Lavoie (1)
Jing Chen (1)
Joanna Lee (1)
Joe Green (1)
Joe Hewitt (3)
Joe Sullivan (1)
Jon Fougner (2)
Jon Warman (2)
Jonathan Hsu (1)
Josh Elman (1)
Josh Wiseman (2)
Julie Trescott (1)
Julie Zhuo (2)
Justin Bishop (1)
KC Estenson (1)
Kari Lee (1)
Kate Losse (3)
Kathy H. Chan (4)
Katie Carter (2)
Katie Geminder (6)
Kevin Arata (1)
Kevin Der (1)
Lars Backstrom (1)
Leah Pearlman (5)
Lee Byron (1)
Liz Perle (1)
Luke Shepard (1)
Malorie Lucich (2)
Mark Kinsey (2)
Mark Slee (9)
Mark Zuckerberg (20)
Matt Cahill (1)
Max Kelly (3)
Mike Honda (1)
Naomi Gleit (4)
Natalie Minor (1)
Nico Vera (3)
Paul Janzer (1)
Paul McDonald (1)
Pedram Keyani (1)
Pete Bratach (1)
Peter X. Deng (2)
Philip Fung (3)
Prashant Malik (1)
Raylene Yung (1)
Richard Allan (2)
Rob Goodlatte (1)
Robert Johnson (1)
Roddy Lindsay (2)
Ruchi Sanghvi (2)
Ryan McGeehan (3)
Sam O'Rourke (1)
Sameer Moidu (1)
Sara Lannin (7)
Sasha Rosse (1)
Scott Marlette (1)
Scott Mills (1)
Shaun King (1)
Simon Axten (3)
Sophia Huang (1)
Steven Grimm (1)
Suzie White (1)
Ted Ullyot (1)
Tim Sparapani (2)
Tom Occhino (1)
Tom Whitnah (5)
Victor Valdez (1)
Wayne Chang (3)
Will Chen (3)
Will Gardner (1)
Xenia Nosov (1)
Yair Landau (1)
Yishan Wong (2)

