The solution strategy of high Concurrent website

Source: Internet
Author: User

The system will face a large number of user access after the official launch, facing high concurrent requests at various levels, so we will adopt high-performance server, high-performance database, high-efficiency programming language, high-performance web container and so on. But in these areas, it is not possible to fundamentally address the high-load and high-concurrency problems faced by large web sites. Therefore, we must make corresponding strategy and technical solution to this.

1. Load Balancing

Load balancing will be the ultimate solution for large web sites to address high-load access and a large number of concurrent requests.

(1) The operation of a single heavy load is divided into multiple node devices to do parallel processing, each node equipment processing end, the results are summarized, returned to the user, the system processing capacity has been greatly improved.

(2) A large number of concurrent access or data traffic to multiple nodes on the device to deal with, reduce the user waiting for response time, which is mainly for Web servers, FTP server, enterprise critical application Server and other network applications.

2. DB Cluster

is to make use of at least two or more database servers to form a virtual single database logical image, which, like a single database system, provides transparent data services to clients.

3. Library Table Hash

The hash algorithm is used to distribute the data into various sub-tables, so that IO is more balanced.

The database cluster mentioned above is constrained by the DB type used in architecture, cost, and extensibility, so we need to consider improving the system architecture from the perspective of the application, and the library table hashing is the most common and effective solution. We install the business and application in the application or function module to separate the database, different modules corresponding to different databases or tables, and then according to a certain policy on a page or function of a smaller database hash, such as the user table, according to user ID for the table hash, This makes it possible to improve the performance of the system at a low cost and has a good scalability. Sohu Forum is the use of such a framework, the Forum users, settings, posts and other information database separation, and then to the post, the user in accordance with the plate and ID hash database and table, finally can be configured in the configuration file simple configuration will allow the system at any time to add a low-cost database to supplement the system performance.

4. Image Server Separation

You know, for the Web server, whether it is Apache, IIS or other containers, the picture is the most consumption of resources, so we have to separate the picture and the page, which is basically a large site will adopt the strategy, they have a separate picture server, and even many picture server. This architecture can reduce the server system pressure to provide page access requests, and can ensure that the system does not crash due to picture problems, on the application server and picture server, can be different configuration optimization, such as Apache in the configuration of contenttype can be as little as possible to support, LoadModule as little as possible to ensure higher system consumption and execution efficiency.

5. Mirroring

Mirroring is often used by large web sites to improve performance and data security, the mirror technology can solve the different network access providers and geographical user access speed differences, such as the difference between chinanet and edunet prompted a lot of websites in the education network to build mirror site, Data is scheduled to be updated or updated in real time.

Automatically copies the entire database or key data to another disk, and whenever the primary database is updated, the DBMS automatically replicates the updated data, i.e. the DBMS automatically guarantees that the mirrored data is consistent with the master data.

In the event of a media failure, the availability of the database can continue to be provided by the mirrored disk, while the DBMS automatically takes advantage of the mirrored disk for database repair without shutting down the system and reloading the database copy.

Database mirroring can also be used for concurrent operations. That is, when a user modifies data with exclusive locks on the database, other users can read the mirror database without waiting for the user to release the lock.

Database mirroring is implemented by replicating data, and frequent replication naturally slows down system performance, so in practice users often choose to mirror only critical data, such as log file mirroring instead of mirroring the entire database.

6. Caching

Apache provides its own cache module, or can use an additional squid module for caching, both of which can effectively improve the access response of Apache. In the use of web language development, all kinds of languages have their own caching modules and methods.

7. html static

Static HTML pages are the most efficient and least expensive, so we can make the pages on our site as static pages as possible. But for a lot of content and frequently updated sites, we can not all manually to achieve, so we have a common information distribution system CMS, like we often visit the various portals of the news channel, and even their other channels, are through the information distribution system to manage and implement, Information Publishing system can realize the simplest information input automatically generate static page, but also can have channel management, rights management, automatic capture and other functions.

In addition to the portal and the type of information publishing site, for the interactive requirements of the Community type site, as much as possible static is also to improve the performance of the necessary means, the community posts, articles in real-time static, there is a renewal of the time and re-static is a lot of use of the strategy, A hodgepodge like mop is the use of such strategies, such as the NetEase community.

At the same time, HTML static is also the use of some caching policies, for the system frequently using database queries but the content of small updates, you can consider the use of HTML static, such as forum public settings information, This information is currently the mainstream forum can be managed in the background and stored in the database, which is actually a lot of the foreground program calls, but the update frequency is very small, you can consider this part of the background update the time to static, so as to avoid a large number of database access requests.

8. CDN Acceleration Technology

The full name of the CDN is the content distribution network. It is by adding a new layer of network architecture to the existing Internet, publishing the content of the site to the "Edge" of the network closest to the user, so that users can get the content they need and improve the responsiveness of the user to the site.

The CDN network increases the cache layer between the user and the server, mainly by taking over the DNS implementation, directing the user's request to the cache to get the data from the source server. After the cache server obtains the content from the actual IP address, it saves locally for later use and returns the retrieved data to the client to complete the data service process.

This article is from the Java My Favorites blog, so be sure to keep this source http://lindianli.blog.51cto.com/7129432/1549044

The solution strategy of high Concurrent website

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.