- Get link
- X
- Other Apps
Software That Helps Facebook Scale
Facebook has had to adapt and expand its operation to include a number of other components and services, as well as changing the approach to existing ones. In some aspects, Facebook is still a LAMP site (sort of), which refers to services employing Linux, Apache, MySQL, and PHP.
For example:
- Facebook continues to use PHP, but it has developed a translator that converts it to native code on its web servers to improve efficiency.
- Facebook utilises Linux, although it has been tailored for its needs (especially in terms of network throughput).
- Since joins and logic may be more easily optimised on the web servers (on the "other side" of the Memcached layer), Facebook employs MySQL largely as a key-value persistent storage.
But enough already. Let's take a look at some of the software that Facebook utilises to power the biggest social networking site on the planet for all of us.
Memcached
Memcached is currently among the most well-known software applications on the internet. As a caching layer between the web servers and MySQL servers, Facebook (and a tonne of other websites) use a distributed memory caching system (since database access is relatively slow). Facebook has significantly improved Memcached and related software over the years (like optimising the network stack).
Tens of terabytes of cached data are stored on Facebook's countless Memcached servers, which the company manages. Most likely, that is the biggest Memcached installation ever.
HipHop for PHP and HipHop Virtual Machine(HHVM)
When compared to code that runs natively on a server, PHP is comparatively slow because it is a scripting language. HipHop turns PHP code into C++ so that it can be compiled for faster performance. Given that Facebook extensively relies on PHP to provide information, this has allowed Facebook to make considerably better use of its web servers.
Haystack
Facebook's high-performance photo storage and retrieval system is called Haystack (although technically Haystack is an object store, thus it isn't required to store photos). Facebook users have submitted more than 20 billion images, and each of those photos is preserved in four distinct resolutions, for a total of more than 80 billion photos.
BigPipe
Facebook has created a dynamic web page serving technology called BigPipe. For best performance, Facebook employs it to serve each web page in portions (referred to as "pagelets").
For instance, the chat window, the news feed, and so forth are all retrieved independently. These pagelets may be fetched simultaneously, which is where the efficiency improvement comes from. It also provides users with a site that functions even if some of it is inoperable or disabled.
Thrift
For its various services, Facebook employs a number of different languages. Erlang is utilised for chat, PHP is used for the front-end, Java and C++ are also used in a number of applications (and perhaps other languages as well). Thrift is an internally built cross-language framework that connects all of these various languages and allows them to communicate with one another. Facebook has found it significantly simpler to maintain its multilingual development as a result.
Varnish
Varnish is an HTTP accelerator that can provide content extremely quickly by caching it and serving it from a load balancer.
Facebook serves photographs and profile pictures using Varnish, processing billions of requests daily. Varnish is open source, much like practically everything else used by Facebook.
React
React was developed in 2011 by Jordan Walke, a software developer at Facebook, as an open-source JavaScript package. React Fiber, a set of visual rendering algorithms, was later unveiled by Facebook. It's interesting to note that one of the most popular JavaScript libraries in use today is React. Read the account of React's rise to fame.
- Get link
- X
- Other Apps
Comments
Post a Comment