Processing and solutions for high concurrent and large traffic access to websites

1. Hardware upgrade

Ordinary P4 servers can generally support up to 100,000 independent IPs per day. If the number of visits is larger than this, then a dedicated server with higher performance must be configured first to solve the problem, otherwise it is impossible to completely solve the performance problem no matter how optimized it is.

2. Load balancing

It distributes requests to each server in the cluster according to a certain load strategy, allowing the entire server cluster to process website requests. 
If the company is relatively rich, it can buy hardware specially responsible for load balancing (such as: F5), and the effect will definitely be very good. For most companies, an inexpensive and efficient way to expand the overall system architecture will be chosen to increase server throughput and processing power, as well as load capacity.

3. Server cluster

Server clustering refers to the grouping of N servers to perform the same service, and the communication between them is realized through the network. Let N servers cooperate with each other to jointly carry the request pressure of a website. 
It appears to the client as if there is only one server. Clusters can use multiple computers for parallel computing to obtain high computing speed, and can also use multiple computers for backup, so that any one machine can be broken and the entire system can still run normally.

4. Database read and write separation

The basic principle is to let the master database handle transactional addition, modification, and deletion operations (INSERT, UPDATE, DELETE), while the slave database handles SELECT query operations.

5. Database sub-table technology (vertical split, horizontal split)

When a piece of data reaches millions, the time it takes you to query once will increase, and if there is a joint query, it is likely to die there. The purpose of sub-tables is to reduce the burden on the database and shorten the query time.

6. Create a corresponding index for the table

Use indexes to quickly access specific information in database tables.

7. Page static

It is best for the front desk to be completely static, and it can be completely unnecessary to access the database.

8. Caching technology (MemCache, Redis)

Caching technology is another solution, which is to store dynamic data in cache files, and dynamic web pages can directly call these files without having to access the database.

9. Prohibition of external hotlinking

Hotlinking of pictures or files from external websites often brings a lot of load pressure, so external hotlinking of pictures or files should be strictly restricted.

10. Control the download of large files

Downloading large files can take up a lot of traffic, and for non-SCSI hard drives, large file downloads can consume CPU and reduce website responsiveness. Therefore, try not to provide downloads of large files exceeding 2M. If you need to provide them, it is recommended to place large files on another server.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325989718&siteId=291194637