How Does Facebook Work?

To sustain this free service, we receive affiliate commissions via some of our links. This doesn’t affect rankings. Our review process.

How does Facebook run their immense site…what programs, languages and technologies do they use?

Know the answer? Comment below! Got your own question? Ask it here.

Disclaimer: This website contains reviews, opinions and information regarding products and services manufactured or provided by third parties. We are not responsible in any way for such products and services, and nothing contained here should be construed as a guarantee of the functionality, utility, safety or reliability of any product or services reviewed or discussed. Please follow the directions provided by the manufacturer or service provider when using any product or service reviewed or discussed on this website.

Leave a Reply

newest oldest most voted
One of the most intriguing aspects of the internet is figuring out exactly how the various websites actually work. I mean exactly which technologies are employed to give our favorite sites their functionality. I think a lot of other people have also been very interested in the technologies which run Facebook. After a bit of research, I am able to say that the following technologies are used on the site itself.

Front End:

The basic front end structure of the Facebook site uses a number of different programs and technologies. The first items used are Linux and Apache. Linux is a good, open source computer operating system. It is very good in terms of security and is very customizable. The web server uses an Apache system, which is also a free open source web server. In fact, Apache is the most popular open source web server program in existence.

Any website which has a number of users has the need for a strong database software. This is certainly the case with Facebook. They use MySQL, which is very fast and reliable. Without getting too technical, MySQL works by spreading the data out over a number of physical nodes and uses load balancing to make sure that everything is being managed properly and the server does not become overloaded. Facebook has also developed a customized partitioning scheme. A global ID is assigned to all the data. They also have a custom archiving scheme which is based on how frequently the data is on a per use basis; however, most data is distributed randomly.

The primary programming language used is PHP. This is a very powerful language with an extensive and active developer community. This is a dynamically interpreted scripting language with tons of power.

Facebook also uses a memory caching system called Memcache. The purpose of this program is to speed up the flow of dynamic database driven systems by caching (temporarily storing) data objects in RAM. This system does a good job at maintaining its speed and alleviating the potential data load.

Back End:

The back end services used by Facebook are generally written in a number of different programming languages. The most common is probably C++, although Java, Python and Erlang are also well represented. Of course, part of their back end and programming philosophy involves using the right programming language for the task. Additionally, Facebook seems to follow the idea of only creating a service as it is needed and creating a framework that makes the whole process easy.

A great example of a framework is Thrift. This is more of a protocol than anything else, but it does support C++, PHP, Python, Erlang, Perl, Java, Ruby and other languages. It is scalable and remote. Additionally, it is able to save development time and provide a division of labor that seems to work quite well.