Almost everybody includes a Facebook account, even individuals who do not know the web. With millions people positively using Facebook, upgrading their status, responding to messages, uploading photos and so forth, how's Facebook's page still loading extremely fast?
The trainer told us Facebook was built only using PHP and MySQL, just how can Facebook's performance be so great?
There is no single reason, but a great deal of reasons:
Using HipHop, which converts PHP into C++ code (that is then put together into a lot more efficient machine code than actual PHP).
Facebook uses PHP and MySQL, but that is not the only factor they will use. For instance, they will use Erlang for his or her chat, Hadoop groupings for a few of their storage. Should you go visit their careers page, you will see they're employing designers with experience of C++, Java, Python, yet others.
Facebook has data distributed across many, many servers. In June 2010, Facebook had 60,000 servers. (think that's an excessive amount of? Google had 500, 000... five years ago)
to say a couple of...
Ultimate reason: http://memcached.org/
They're saying 98% of all things the thing is on Facebook comes from their massive memcache server cluster.
Take a look at http://facebook.com/techtalks.
The astonishing part is when large things are at facebook. With countless customers and 1000's of servers, a apparently small optimisation can finish up saving them huge amount of money or gb of memory.
More information at http://highscalability.com/blog/category/facebook
- Getting many servers
- Getting many wise people focusing on which makes it fast.
This short article discusses intricacies of Facebook: http://royal.pingdom.com/2010/06/18/the-software-behind-facebook/
There is a put together version of php, actually. My prediction would need to be: insane levels of crazy hardware, extremely efficient code, along with a database structure enhanced with caching, denormalization, clustering...
Simply because they have lots of money. Employing wise designers and purchasing a lot of servers each week is very pricey.