Social networking is the art of abutting with those who allotment accepted interests. Your “˜network’ is a association that helps accumulate you affiliated with others and offers abounding benefits. Networking via amusing media sites has revolutionized how we use the Internet and is at the beginning of what we now alarm Web 2.0.
Facebook is amusing networking. Bodies accept been “facebooking” anniversary added for about 6 years now, authoritative Facebook the best acclimated amusing arrangement with over 350 actor users worldwide. But how does Facebook work?
In this article, I will altercate Facebook’s close workings, accoutrement its architectonics and frontend/backend infrastructure””the basics and bolts that authority Facebook together.
How Does Facebook Work?””The Advanced End
Facebook uses a arrangement of services, tools, and programming languages to accomplish up its amount infrastructure. At the advanced end, their servers run a LAMP (Linux, Apache, MySQL, and PHP) assemblage with Memcache. Not a computer science expert? Let’s booty a attending at absolutely what that means.
Linux & Apache
how does facebook work
This allotment is appealing self-explanatory. Linux is a Unix-like computer operating arrangement kernel. It’s accessible source, actual customizable, and acceptable for security. Facebook runs the Linux operating arrangement on Apache HTTP Servers. Apache is additionally chargeless and is the best accepted accessible antecedent web server in use.
MySQL
how does facebook work
For the database, Facebook utilizes MySQL because of its acceleration and reliability. MySQL is acclimated primarily as a key-value abundance as abstracts is about broadcast amidst a ample set of analytic instances. These analytic instances are advance out beyond concrete nodes and amount acclimation is done at the concrete bulge level.
As far as customizations are concerned, Facebook has developed a custom administration arrangement in which a all-around ID is assigned to all data. They additionally accept a custom archiving arrangement that is based on how common and contempo abstracts is on a per-user basis. Best abstracts is broadcast randomly.
PHP
how does facebook work
Facebook uses PHP because it is a acceptable web programming accent with all-encompassing abutment and an alive developer association and it is acceptable for accelerated iteration. PHP is a dynamically typed/interpreted scripting language.
Memcache
how facebook works
Memcache is a anamnesis caching arrangement that is acclimated to acceleration up activating database-driven websites (like Facebook) by caching abstracts and altar in RAM to abate annual time. Memcache is Facebook’s primary anatomy of caching and helps allay the database load.
Having a caching arrangement allows Facebook to be as fast as it is at abandoning your data. If it doesn’t accept to go to the database it will aloof back your abstracts from the accumulation based on your user ID.
Downsides to Application LAMP
Facebook has accomplished that there are downsides to application the LAMP stack. Notably, PHP is not necessarily optimized for ample websites and accordingly adamantine to scale. Also, it is not the fastest active accent and the addendum framework is difficult to use.
how facebook works
Mike Schroepfer, Facebook’s Vice President of Engineering, afresh did an annual at EmTech@MIT apropos this. “Scaling any website is a challenge,” Schroepfer said, “but ascent a amusing arrangement has altered challenges.”
He went on to say that clashing added websites, you can’t aloof add added servers to break the botheration because of Facebook’s “huge commutual dataset.” New access are created all the time due to user activity.
Facebook has developed so bound that they are generally faced with issues apropos database queries, caching, and accumulator of data. Their database is huge and abundantly complex. To annual for this, Facebook has started a lot of accessible antecedent projects and backend services.
How Does Facebook Work?””The Back End
Facebook’s backend casework are accounting in a arrangement of altered programming languages including C++, Java, Python, and Erlang. Their aesthetics for the conception of casework is as follows:
1. Create a account if needed
2. Create a framework/toolset for easier conception of services
3. Use the appropriate programming accent for the task
A account of all of Facebook’s accessible antecedent developments can be begin here. I will altercate a few of the capital accoutrement that Facebook has developed.
Thrift (protocol)
Thrift is a failing alien action alarm framework for scalable cross-language casework development. Thrift supports C++, PHP, Python, Perl, Java, Ruby, Erlang, and others. It’s quick, saves development time, and provides a analysis of activity of assignment on high-performance servers and applications.
Scribe (log server)
Scribe is a server for accumulation log abstracts streamed in real-time from abounding added servers. It is a scalable framework advantageous for logging a advanced arrangement of data. It is congenital on top of Thrift.
Cassandra (database)
how facebook works
Cassandra is a database administration arrangement advised to handle ample amounts of abstracts advance out beyond abounding servers. It admiral Facebook’s Inbox Search affection and provides a structured key-value abundance with closing consistency.
HipHop for PHP
HipHop for PHP is a antecedent cipher agent for PHP calligraphy cipher and was created to save server resources. HipHop transforms PHP antecedent cipher into optimized C++. After accomplishing this, it uses g++ to abridge it to apparatus code.
Conclusion
In a nutshell, that’s Facebook. This commodity could calmly be 37 pages best if I were to go into added detail, but to acknowledgment the catechism “How does Facebook work?” I anticipate this will suffice. If you attending accomplished all of the appearance and innovations the capital abstraction abaft Facebook is absolutely actual basic””keeping bodies connected. Facebook realizes the ability of amusing networking and is consistently innovating to accumulate their account the best in the business.
Facebook is amusing networking. Bodies accept been “facebooking” anniversary added for about 6 years now, authoritative Facebook the best acclimated amusing arrangement with over 350 actor users worldwide. But how does Facebook work?
In this article, I will altercate Facebook’s close workings, accoutrement its architectonics and frontend/backend infrastructure””the basics and bolts that authority Facebook together.
How Does Facebook Work?””The Advanced End
Facebook uses a arrangement of services, tools, and programming languages to accomplish up its amount infrastructure. At the advanced end, their servers run a LAMP (Linux, Apache, MySQL, and PHP) assemblage with Memcache. Not a computer science expert? Let’s booty a attending at absolutely what that means.
Linux & Apache
how does facebook work
This allotment is appealing self-explanatory. Linux is a Unix-like computer operating arrangement kernel. It’s accessible source, actual customizable, and acceptable for security. Facebook runs the Linux operating arrangement on Apache HTTP Servers. Apache is additionally chargeless and is the best accepted accessible antecedent web server in use.
MySQL
how does facebook work
For the database, Facebook utilizes MySQL because of its acceleration and reliability. MySQL is acclimated primarily as a key-value abundance as abstracts is about broadcast amidst a ample set of analytic instances. These analytic instances are advance out beyond concrete nodes and amount acclimation is done at the concrete bulge level.
As far as customizations are concerned, Facebook has developed a custom administration arrangement in which a all-around ID is assigned to all data. They additionally accept a custom archiving arrangement that is based on how common and contempo abstracts is on a per-user basis. Best abstracts is broadcast randomly.
PHP
how does facebook work
Facebook uses PHP because it is a acceptable web programming accent with all-encompassing abutment and an alive developer association and it is acceptable for accelerated iteration. PHP is a dynamically typed/interpreted scripting language.
Memcache
how facebook works
Memcache is a anamnesis caching arrangement that is acclimated to acceleration up activating database-driven websites (like Facebook) by caching abstracts and altar in RAM to abate annual time. Memcache is Facebook’s primary anatomy of caching and helps allay the database load.
Having a caching arrangement allows Facebook to be as fast as it is at abandoning your data. If it doesn’t accept to go to the database it will aloof back your abstracts from the accumulation based on your user ID.
Downsides to Application LAMP
Facebook has accomplished that there are downsides to application the LAMP stack. Notably, PHP is not necessarily optimized for ample websites and accordingly adamantine to scale. Also, it is not the fastest active accent and the addendum framework is difficult to use.
how facebook works
Mike Schroepfer, Facebook’s Vice President of Engineering, afresh did an annual at EmTech@MIT apropos this. “Scaling any website is a challenge,” Schroepfer said, “but ascent a amusing arrangement has altered challenges.”
He went on to say that clashing added websites, you can’t aloof add added servers to break the botheration because of Facebook’s “huge commutual dataset.” New access are created all the time due to user activity.
Facebook has developed so bound that they are generally faced with issues apropos database queries, caching, and accumulator of data. Their database is huge and abundantly complex. To annual for this, Facebook has started a lot of accessible antecedent projects and backend services.
How Does Facebook Work?””The Back End
Facebook’s backend casework are accounting in a arrangement of altered programming languages including C++, Java, Python, and Erlang. Their aesthetics for the conception of casework is as follows:
1. Create a account if needed
2. Create a framework/toolset for easier conception of services
3. Use the appropriate programming accent for the task
A account of all of Facebook’s accessible antecedent developments can be begin here. I will altercate a few of the capital accoutrement that Facebook has developed.
Thrift (protocol)
Thrift is a failing alien action alarm framework for scalable cross-language casework development. Thrift supports C++, PHP, Python, Perl, Java, Ruby, Erlang, and others. It’s quick, saves development time, and provides a analysis of activity of assignment on high-performance servers and applications.
Scribe (log server)
Scribe is a server for accumulation log abstracts streamed in real-time from abounding added servers. It is a scalable framework advantageous for logging a advanced arrangement of data. It is congenital on top of Thrift.
Cassandra (database)
how facebook works
Cassandra is a database administration arrangement advised to handle ample amounts of abstracts advance out beyond abounding servers. It admiral Facebook’s Inbox Search affection and provides a structured key-value abundance with closing consistency.
HipHop for PHP
HipHop for PHP is a antecedent cipher agent for PHP calligraphy cipher and was created to save server resources. HipHop transforms PHP antecedent cipher into optimized C++. After accomplishing this, it uses g++ to abridge it to apparatus code.
Conclusion
In a nutshell, that’s Facebook. This commodity could calmly be 37 pages best if I were to go into added detail, but to acknowledgment the catechism “How does Facebook work?” I anticipate this will suffice. If you attending accomplished all of the appearance and innovations the capital abstraction abaft Facebook is absolutely actual basic””keeping bodies connected. Facebook realizes the ability of amusing networking and is consistently innovating to accumulate their account the best in the business.
No comments:
Post a Comment