In recent days has been reading De Shenjun's blog, he is discuz! The NT designer, reading his series about discuz! NT Architecture Design article, the big call, especially discuz! I am particularly interested in the range of scenarios that NT has designed to address high-access concurrency. The purpose of writing this article is a summary of the first reading after the memo, so that there will be time to personally test, if you can be used in the production environment, it is more valuable reference.
Test method:
Local simulation test Site high Access high concurrency the test tool used is the famous LoadRunner, which is commonly known as a tool for testing. In De Shenjun's blog, there are several descriptions of stress 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 consider the Internet application scenario high concurrency high traffic demand, in the common open source version, the main use of the caching mechanism to improve the performance of the system.
First, to alleviate the 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 caching capabilities, System.Web.Caching.Cache
This solution can solve the general traffic is not very large site requirements, a higher level, you can increase the Web garden work process to achieve the need to improve performance, and in this scenario, has solved the multi-process cache synchronization problem.
In discuz! NT Enterprise Edition, provides a higher level of solution, using the distributed cache mechanism, introduced memcached, Redis, Llserver, related articles are as follows:
discuz! Integrated memcached distributed cache 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-site 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 set of distributed memory object caching systems developed by danga.com (the technical team of operations LiveJournal) to reduce database load and improve 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 specificity of the forum products, reading and writing ratio is about 4:1, so first should be in the reading of data decompression optimization.
Second, ease the Web server pressure
discuz! NT has adopted the following scheme to alleviate the stress of Web server.
- Send user uploaded attachments to another server via FTP, related articles are as follows:
discuz! Features of remote attachments in NT [FTP protocol]
Http://www.cnblogs.com/daizhj/archive/2008/07/28/1254648.html
3. Distributing the static file cache through Squid
Using squid as a static front end, the most static files in the forum are sent or chained to a new HTTP link, which reduces the pressure on the Web server and improves performance.
discuz! NT static file Cache (SQUID) solution
Http://www.cnblogs.com/daizhj/archive/2010/06/10/1692758.html
Third, load balancing
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 scenario. The use of lvs+keepalived, Nginx and so on. Related articles are as follows:
discuz! NT Load Balancer solution (HA)---LVS (Linux Virtual Server)
Http://www.cnblogs.com/daizhj/archive/2010/06/13/1693673.html
discuz! NT Load Balancer 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
The use of Nginx, using Nginx as the front-end load balancing, this is really attractive, there is time to try the next good.
Iv. Mitigation of database pressure
In discuz! NT, as a data persistence tool, the database must be a ' bottleneck ' of system performance in the case of frequent concurrent accesses and large load pressures. Even with the use of the local cache above to solve the problem of frequent access to the database, but there will still be a large number of concurrent requests to access dynamic data, where the ' read and write separation ' scheme is a widely used scenario. Related articles:
discuz! NT database reading and writing separation scheme
Http://www.cnblogs.com/daizhj/archive/2010/06/21/dbsnap_master_slave_database.html
Full-Text Search scenario:
discuz! Sphinx Full-Text Search for NT Enterprise Edition (top)
Http://www.cnblogs.com/daizhj/archive/2010/06/28/discuznt_entlib_sphinx_one.html
discuz! Sphinx Full-Text Search for NT Enterprise Edition (bottom)
Http://www.cnblogs.com/daizhj/archive/2010/06/30/discuznt_entlib_sphinx_two.html
Working with large data volumes:
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 to improve the performance of a series of solutions, indeed for the ASP. NET Internet applications are very valuable, including many of the open source products are based on Linux, such as memcached, Redis, Llserver, SQUID, NGINX, LVS, Sphinx, although some products have Windows version, but its performance ability is far less than Linux above, it appears in the Web application, performance and open source product research, Linux far away in front of Windows.
Transferred from: http://www.cnblogs.com/qq75077027/archive/2012/11/27/2791703.html
ASP. NET addresses high concurrency scenarios.