1000000 PHP website framework for sharing Poppen.de

2010-07-23  来源:本站原创  分类:Internet  人气:237 

Have understood the world's largest PHP site, Facebook's background technology , they are now a 1 million we have to learn PHP web site structure: Poppen.de. Poppen.de is a German social networking site, relative Facebook, Flickr is a very small site, but it has a very good framework for integration of many technologies, such as Nigix, MySQL, CouchDB, Erlang, Memcached, RabbitMQ, PHP, Graphite, Red5 and Tsung.

Poppen.de currently 200 million registered users, while the project team of 11 developers, two designs, two system administrators. The site's business model with free value-added model, the user can use the search user, send messages to friends, uploading pictures and video capabilities.

If the user wants to enjoy unlimited messages and upload pictures, then have to pay according to different types of membership services, video chat and other services sites to adopt the same strategy.

Nginx

Poppen.de All services are based on Nginx services. Nginx front-end servers with two per minute at the peak of 150 000 times to provide the requested load, each machine has four years of life, and only one CPU and 3GB RAM. Poppen.de has three separate image server, by the three Nginx server *. bilder.poppen.de 80 000 times per minute to provide requested service.

Nginx architecture is a cool design, many requests are handled by the Memcached, so a request to get content from the cache without the need for direct access to the PHP machine. For example, the user information page (user profile) is a content site requires intensive treatment, if the user information page to Memcached on all the cache, then the request to obtain content directly from Memcached on. Poppen.de of Memcached 8,000 times per minute to handle the request.

Architecture has three Nginx image server provides local image cache, user uploaded images to a central file server. When one of the three Nginx request an image, if the server does not exist in the local image, from the central file server to download to the server for caching and delivering services. This distributed image server load balancing architecture can reduce the load on the main storage device.

PHP-FPM

The site runs on the PHP-FPM. A total of 28 twin-CPU, 6GB of memory PHP machine, each machine is running PHP-FPM 100 worker threads. APC enabled to use the PHP5.3.x. PHP5.3 can reduce the CPU and memory usage of 30%.

Code is based on the Symfony 1.2 framework on development. One can use external resources, and second, to improve project development, and also in the framework of a well-known can make it easier for new developers to join the team. Although nothing is perfect, but you can get from the Symfony framework many benefits, so the team can focus more on business development Poppen.de up.

Website performance optimization using XHProf , this is out of a library open-source Facebook. This framework is very easy to personalize and configure, can be most costly cache server computing.

MySQL

MySQL is the site main RDBMS. Web site has several MySQL server: a 4CPU, 32GB of server storage user information, such as basic information, photos, descriptions and so on. The machine has been used for 4 years, next step will be to replace it using the shared cluster. Based on this system is still designed to simplify data access code. Data partitions according to user ID, because the majority of sites are user-centric information, such as photos, videos, news.

Have three servers in the Lord - from - from the configuration architecture provides service user forum. A site from the server is responsible for custom message store, and now there are 250 million messages. The other four main machines - from the configuration relationship. Another machine configured by the four groups specializing in intensive NDB write data, such as user access statistical information.

Associated data tables designed to avoid operation, as most of the data cache. Of course, the database structure of norms has been completely destroyed. Therefore, in order to more easily search, database design to create a data mining table. Most tables are MyISAM type table, can provide rapid search. The problem now is that more and more table has been locked the whole table. Poppen.de are considering migration to XtraDB storage engine.

Memcached

Web application framework Memcached a lot more than 45GB of cache and 51 nodes. Cache Session session, view the cache as well as functions such as the implementation of the cache. Framework of a system when the record is modified automatically when the data update to the cache to. Future possible options to improve the cache is updated with new Redis Hash API or MongoDB.

RabbitMQ

Began in 2009 in the framework of the use of RabbitMQ . This is a very good messaging solutions, easy deployment and centralized to this framework to go after in LVS run the two RabbitMQ server. In the last month, has put more stuff into the queue, which means the same time there are 28 sets of PHP server to handle 50 million times a day request. Send logs, e-mail notification, system messages, upload images and more things to this queue.

Applied PHP-FPM in fastcgi_finish_request () function integrated queue messages, asynchronous messages can be sent to the queue. When the system needs to send HTML or JSON response format, on the call this function, so users do not need to wait until the PHP script clean-up.

The system can improve the resources management. For example, in the peak of service 1000 times per minute to handle login requests. This means that there are 1000 concurrent update user table holds the user's login time. Using a queuing mechanism, can be run in reverse order to these queries. If you need to increase processing speed, only need to add more queue handler can even add more servers to the cluster to go, without modifying any configuration and deployment of new nodes.

CouchDB

Log storage CouchDB running on one machine. In this machine can modules / behavior log queries / group, or under the wrong type and so on. This positioning is very useful. Aggregation service CouchDB using the log before the station had to log on to PHP by the server log analysis to locate the problem, which is very troublesome. Now concentrate all the logs stored in the queue to CouchDB, you can concentrate on inspection and analysis of the problem.

Graphite

Use Graphite collect real-time information and statistics site. Each module from the request / behavior to Memcached hit and miss, RabbitMQ condition monitoring and Unix load so. Graphite services 4800 times every minute update operation. Practice has proven to monitor what sites made is very useful, it's a simple text protocol and graphics can easily be used to plug Fangshi any need to monitor the system.

One cool thing is the use of Graphite also monitor two versions of the site. January Symfony framework deployed a new version of the code before deployment as a backup. This means the site may face performance problems. Graphite can be used therefore to compare the two versions online.

Find a new version of the Unix load form a high, so the two versions use XHProf performance analysis, identify the problems.

Red5

Web site also provides users two types of video services, one user uploaded the video, the other is video chat, users interact and share video. Mid-2009, a month to provide users with 17TB of traffic services.

Tsung

Tsung is a distributed written in Erlang benchmark analysis tools. Site is mainly used in Poppen.de HTTP benchmarking analysis, MySQL and other storage systems (XtraDB) Comparative Analysis. Recorded with a system flow of the main MySQL server, and then transform Tsung benchmark session. Then play back the traffic, generated by the Tsung thousands of concurrent users to access the laboratory server. This test environment can be very close to the real scene.

http://news.cnblogs.com/n/69038/

相关文章
  • 1000000 PHP website framework for sharing Poppen.de 2010-07-23

    Have understood the world's largest PHP site, Facebook's background technology , they are now a 1 million we have to learn PHP web site structure: Poppen.de. Poppen.de is a German social networking site, relative Facebook, Flickr is a very small site

  • 1000000 PHP website framework Toolbox 2010-08-02

    Have understood the world's largest PHP site, Facebook, background technology , they are now a 1 million we have to learn PHP web site structure : Poppen.de. Poppen.de is a German social networking site, relative Facebook, Flickr is a very small site

  • One million PHP website framework Toolbox 2011-01-08

    Have understood the world's largest PHP site, Facebook's technology background, today we know a one million PHP site site architecture: Poppen.de. Poppen.de is a German social networking site, is relatively Facebook, Flickr is a very small site, but

  • Website promotion experience sharing 2010-08-20

    Website promotion and website optimization is already familiar to many people's work, in both work, although there are a lot of people upset over; a lot of people feel helpless; a lot of people might be boring because of work, but gave up; have Altho

  • Large-scale structure of PHP website 2010-07-14

    Poppen.de is a German social networking site, relative Facebook, Flickr is a very small site, but it has a very good framework for integration of many technologies, such as Nigix, MySql, CouchDB, Erlang, Memcached, RabbitMQ, PHP, Graphite, Red5 and T

  • A large PHP web framework 2010-07-23

    Poppen.de is a German social networking site, relative Facebook, Flickr is a very small site, but it has a very good framework for integration of many technologies, such as Nigix, MySql, CouchDB, Erlang, Memcached, RabbitMQ, PHP, Graphite, Red5 and T

  • One million PHP Web Framework Programme 2010-11-04

    Have understood the world's largest PHP site, Facebook background technology, today we come to understand a mega-site PHP site framework: Poppen.de. Poppen.de is a German social networking site, relative Facebook, Flickr is a very small site, but it

  • Ajax-based application framework summary 2009-08-25

    Browser-side framework is divided into two broad categories: Application Framework: provides the function of the browser, but often include abstract widget and other components known, the main function of the framework around the desktop GUI. The bas

  • To increase the social sharing blog button code 2010-03-24

    Now many in the core content of the website are the bottom of the article to add the button to share the community-based, allowing users to browse the discovery of a valuable article, you can quickly share through social networks to your friends, thi

  • 128 ajax / javascript framework 2010-07-30

    128 ajax / javascript framework AJAX framework can help us to rapidly develop through JavaScript calling WebService (Server Page) pages, but not required to submit the entire page. Recent web applications use AJAX to improve the pages can be interact

  • One million PHP Sitemap Toolbox 2011-01-08

    Have understood the world's largest PHP site, Facebook background technology, today we come to understand a mega-site PHP site framework: Poppen.de. Poppen.de is a German social networking site, relative Facebook, Flickr is a very small site, but it

  • Ajax Introduction 2009-04-11

    Ajax Introduction AJAX called "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), refers to a web-based applications to create interactive web development technologies. Mainly includes the following types of technology Ajax (Asy

  • AJAX knowledge 2009-06-08

    AJAX-wide known as "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), refers to a web-based applications to create interactive web development technologies. Domestic usual pronunciation for "Ajax" and the pronunciatio

  • Inventory of open source cms system in 2010 2010-03-08

    Filed open source cms, we first think of php the cms, php open source because the earliest, and most users and webmasters recognized as the major function of cms system continuous improvement and a variety of open source cms appearance,. net, and the

  • C # Open Source Projects 2010-06-18

    1, AOP framework Encase is developed for C #,. NET platform provides AOP framework. Encase provides the unique aspects (aspects) to deploy to the run-time code, and other AOP frameworks rely on configuration files. This deployment (aspects) of the wa

  • Javascript开发包大全整理 2015-01-10

    Prototype Prototype is a JavaScript framework that aims to ease development of dynamic web applications. Homepage: http://prototype.conio.net Documentation: http://blogs.ebusiness-apps.com/jordan/pages/Prototype%20Library%20Info.htm http://www.sergio

  • Search Engine Optimization Design Guide 2009-11-09

    Nearly 10% of people do not think the seo (search engine optimization) is the designer should shoulder responsibility. I am even more surprising is that even 24% do not know what is seo. If you do not know what is seo help seo, or do not understand w

  • The most complete summary of ASP.NET Open Source CMS 2010-03-09

    Domestic CMS: 1.SiteServer CMS SiteServer CMS Web content management system (copyright registration number 2008SR15710) is targeted at high-end market, CMS content management system, can become the lowest This, at least in the human input in the shor

  • . Net inventory of open source cms system 2010-03-09

    I have a number of recent studies. Net open source cms system that better summed up a few, to share the hope that the benefit to you, not a headache every day looking for cms systems, and Oh, absolutely all free, open source. . Net open source cms sy

  • 128 ajax / javascript frameworks 2010-07-30

    128 ajax / javascript framework AJAX framework can help us to rapidly develop through JavaScript calling WebService (Server Page) pages, but not required to submit the entire page. Recent web applications use AJAX to improve the pages can be interact