Why Facebook is so fast ???

More than billion of people are using Facebook and expressing themselves and interacting with their peer and friends through wall posts, uploading their photos, passing information’s about events and other meaningful information. They need a large scalable database system to handle & process this very large data.

To solve this Facebook has implemented MySQL database and lot of cached data which they use dynamically. By cashing lot of user data they are saving tons of transactions happening on Database in a second.

Facebook Architecture

Following are some of the Libraries which has made this possible:

Memcached: This is is a general-purpose distributed memory caching system now used by many sites including Facebook, Wikipedia, Flickr, Twitter, Youtube. Facebook uses this memory caching system to speed up dynamic database driven web pages by caching data and objects in RAM to reduce reading time from DB. Cache is a component that transparently stores data so that future requests for that data can be served faster.

If user get logged in and active then Facebook loads all necessary information beside him on cache cluster and dynamically access this data. This is how Facebook is reducing the response time of site !!!

Varnish: Is is an HTTP accelerator designed for content-heavy dynamic web sites  which can act as a load balancer and also cache content which can then be served lightning-fast. Varnish stores data in virtual memory and leaves the task of deciding what is stored in memory and what gets paged out to disk to the operating system. This helps avoid the situation where the operating system starts caching data while it is moved to disk by the application. Facebook uses Varnish to serve photos and profile pictures,handling billions of requests every day.

HipHop for PHP: It describes a series of PHP execution engines and improvements created by Facebook. The original motivation of HipHop was to save resources on Facebook servers, given the large PHP codebase of facebook.com. As development of HipHop progressed, it was realized that HipHop could substantially increase the speed of PHP applications in general.

To know more about Facebook technology visit their page: https://www.facebook.com/Engineering.

Ganesh Bhosale

From a laptop to a full organization, Ganesh has traveled a tough road. A commando, armed with the latest tech & a huge warehouse of knowledge, he leads by example & is here for the long haul. His strong belief in giving back more has borne rich fruits, both for his employees & clients.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *