7

Facebookがユーザーのホームページをレンダリングするためにいくつのdbクエリを発行しているのだろうかと思っていました。Facebook DBがどのように設計されているかについて、誰かが考えを持っていますか? MySql を実行し、数千のレプリカと DB サーバーよりも多くの memcache サーバーがあると聞いたことがあります。

Facebookのデータはシャード化されていますか?

ある場合は、すべてのシャードに移動して、友人の最新の更新を検索します。最悪の場合、100 人の友達がいて、Facebook に 101 のシャードがあると仮定すると、私の友達はそれぞれ別のシャードにいる可能性があります。Facebookはこれをどのように処理していますか?

「ソーシャル ネットワーキング Web サイト用の DB を設計する方法」のようなヒントや指針を誰かが提供してくれたら、非常に感謝します。私はただ興味があります!

4

4 に答える 4

13

Facebook is using LAMP structure. Facebook’s backend services are written in a variety of different programming languages including C++, Java, Python, and Erlang and they are used according to requirement. With LAMP Facebook uses some technologies ,to support large number of requests, like

  1. Memcache - It is a memory caching system that is used to speed up dynamic database-driven websites (like Facebook) by caching data and objects in RAM to reduce reading time. Memcache is Facebook’s primary form of caching and helps alleviate the database load. Having a caching system allows Facebook to be as fast as it is at recalling your data.

  2. Thrift (protocol) - It is a lightweight remote procedure call framework for scalable cross-language services development. Thrift supports C++, PHP, Python, Perl, Java, Ruby, Erlang, and others.

  3. Cassandra (database) - It is a database management system designed to handle large amounts of data spread out across many servers.

  4. HipHop for PHP - It is a source code transformer for PHP script code and was created to save server resources. HipHop transforms PHP source code into optimized C++. After doing this, it uses g++ to compile it to machine code.

If we go into more detail, then answer to this question go longer. We can understand more from following posts:

  1. How Does Facebook Work?
  2. Data Management, Facebook-style
  3. Facebook database design?
  4. Facebook wall's database structure
  5. Facebook "like" data structure
于 2012-08-01T18:43:40.523 に答える
3

この Web サイトでは、これらの大手インターネット企業とその技術構造に関する多くの詳細を見つけることができます。

http://highscalability.com/

于 2012-07-02T07:03:13.923 に答える
0

@Somnath Mulukの回答に追加 - FacebookはHadoopなどの他のテクノロジーをほとんど使用していません.

詳細については、次のリンクを参照してください。

http://www.quora.com/Facebook-Engineering/What-is-Facebooks-architecture

Facebook のアーキテクチャ

それが役に立てば幸い。

于 2012-08-03T06:31:12.223 に答える
0

ゼロ。平均して、それはです。Facebook のように多数のユーザーがいる高度に相互接続されたネットワークは、頻繁に表示されるページの RAM を完全に使い果たした場合にのみ効果的に動作します。ほぼすべてのデータがすでに memcache にあるはずです。

于 2012-08-03T21:59:48.873 に答える