In recent days has been reading De Shenjun's blog, he is discuz! The designer of NT, read his series about discuz! NT Architecture design article, big shout, especially discuz! NT in the solution of high access high concurrency is designed a series of programs, I am particularly interested. The purpose of this article is to review the summary after the first reading, so that there will be time to personally test, if it can be used in the production environment, it is more reference value.
Test method:
Local analog test Web site high Access high concurrency test tools are well-known LoadRunner, this tool to do testing are generally known. In De Shenjun's blog, there are a few of the following to introduce pressure concurrency testing through LoadRunner.
When Discuznt met the LoadRunner (on)
Http://www.cnblogs.com/daizhj/archive/2009/09/25/1573926.html
When Discuznt met LoadRunner (middle)
Http://www.cnblogs.com/daizhj/archive/2009/09/27/1574897.html
When Discuznt met LoadRunner (next)
Http://www.cnblogs.com/daizhj/archive/2009/09/27/1575091.html
discuz! NT is a forum program, is a typical Internet application, in the design itself to take into account the Internet scenario high concurrent high traffic demand, in the general open source version, the main use of caching mechanism to improve the performance of the system.
first, the ease of database reading pressure
Related articles are as follows:
discuz! A brief analysis of NT cache design [Original]
Http://www.cnblogs.com/daizhj/archive/2007/08/15/855163.html
This caching mechanism uses the. NET itself provides the caching function, System.Web.Caching.Cache
This solution can solve the general traffic is not very large site needs, a higher level, you can increase the Web garden work process to achieve performance requirements, and this solution has been resolved under the multi-process cache synchronization problem.
In discuz! NT Enterprise Edition, provides a higher level of solution, using the distributed caching mechanism, introduced memcached, Redis, Llserver, related articles are as follows:
discuz! Integrated memcached distributed caching in NT
Http://www.cnblogs.com/daizhj/archive/2009/03/23/1386652.html
In discuz! Cache tiering in NT (local cache +memcached)
Http://www.cnblogs.com/daizhj/archive/2009/11/17/1604436.html
discuz! Design of Redis Architecture in NT
Http://www.cnblogs.com/daizhj/archive/2011/02/21/1959511.html
discuz! NT cross-Station cache synchronization
Http://www.cnblogs.com/daizhj/archive/2010/06/18/discuznt_memcache_syncdata.html
discuz! Design of Llserver Architecture in NT
Http://www.cnblogs.com/daizhj/archive/2011/08/26/discuznt_llserver_arch.html
Memcached is a distributed memory object caching system developed by danga.com (the LiveJournal technical team) for reducing database load and improving performance in dynamic systems. The specific introduction can refer to:
memcached Depth Analysis
Http://www.cnblogs.com/luluping/archive/2009/01/14/1375456.html
Through the above scheme, can solve most high access high concurrency requirements, because the forum product specificity, read and write ratio is about 4:1, so first of all should be in the reading data for decompression optimization.
second, ease the Web server pressure
discuz! NT uses the following scheme to mitigate the pressure on Web servers.
Upload the user's attachment via FTP to another server, the relevant articles are as follows:
discuz! Implementation of remote attachment in NT [FTP protocol]
Http://www.cnblogs.com/daizhj/archive/2008/07/28/1254648.html
3. The static file cache distribution via Squid
Using squid to do static front-end, most of the static files in the forum or outside the chain to a new HTTP link, so that the Web server decompression, improve performance.
discuz! NT static file Cache (SQUID) solution
Http://www.cnblogs.com/daizhj/archive/2010/06/10/1692758.html
third, load balance
Through the above scenario, the Web server pressure is small, performance also improved, but if you encounter higher concurrent traffic, a single Web server can not meet the demand, discuz! NT takes a load-balanced scheme. The use of lvs+keepalived, Nginx and so on. Related articles are as follows:
discuz! NT Load Balancing solution (HA)---LVS (Linux Virtual Server)
Http://www.cnblogs.com/daizhj/archive/2010/06/13/1693673.html
discuz! NT Load Balancing solution (HA)---LVS (Linux Virtual Server)
Http://www.cnblogs.com/daizhj/archive/2010/06/13/1693673.html
discuz! NT Load Balancing Scheme
Http://www.cnblogs.com/daizhj/archive/2010/06/24/1667422.html
Using the Nginx, using Nginx as the front end load balancing, this is really attractive and there is time to try it out.
Iv. alleviating the pressure of the database
In discuz! In NT, as a data persistence tool, database is bound to become the bottleneck of system performance under the condition of frequent concurrent access and high load pressure. Even if the local cache is used to solve the problem of frequent access to the database, there will still be a large number of concurrent requests to access dynamic data, in which the ' Read and write separation ' scheme is a widely adopted scheme. Related articles:
discuz! An NT database read-write separation scheme
Http://www.cnblogs.com/daizhj/archive/2010/06/21/dbsnap_master_slave_database.html
Full-Text Search scenario:
discuz! NT Enterprise version of Sphinx full-text search (top)
Http://www.cnblogs.com/daizhj/archive/2010/06/28/discuznt_entlib_sphinx_one.html
discuz! NT Enterprise version of Sphinx full-Text search (next)
Http://www.cnblogs.com/daizhj/archive/2010/06/30/discuznt_entlib_sphinx_two.html
Processing large amount of data:
discuz! NT TENS data volume on the two carriages--tokyocabinet,mongodb
Http://www.cnblogs.com/daizhj/archive/2010/07/22/1781140.html
All right, there's discuz!. NT Enterprise Edition in order to enhance the performance of a series of programs, indeed the ASP.net Internet application is very valuable reference, which uses a lot of open source products are based on Linux, such as memcached, Redis, Llserver, SQUID, NGINX, LVS, Sphinx, although some products have a Windows version, but its performance is far less than Linux, it appears in the Web applications, performance and open source product research, Linux far away in front of Windows.