10 solutions for high-concurrency and high-traffic websites

10 solutions for high-concurrency and high-traffic websites

1. Hardware upgrade

An ordinary P4 server can generally support up to 100,000 independent IPs per day. If the traffic is greater than this, a higher-performance dedicated server must be configured first to solve the problem. Otherwise, no optimization can completely solve the performance problem.

2. Load Balancing

It distributes requests to each server in the cluster based on a certain load strategy, allowing the entire server cluster to handle website requests.

Companies with more money can buy hardware specifically responsible for load balancing (such as: F5), and the effect will definitely be very good. For most companies, they will choose a cheap and effective method to expand the architecture of the entire system to increase the server's throughput and processing power, as well as the carrying capacity.

[[243203]]

3. Server Cluster

Server clustering refers to the collection of N servers to provide the same service together, and they communicate with each other through the network. N servers can cooperate with each other and jointly bear the request pressure of a website.

From the client's perspective, there is only one server. A cluster can use multiple computers to perform parallel computing to achieve very high computing speeds, and can also use multiple computers for backup, so that if any machine fails, the entire system can still operate normally.

4. Database read-write separation

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

5. Database table partitioning technology (vertical partitioning, horizontal partitioning)

When a table has millions of data, it will take longer to query once. If there is a joint query, it is likely to fail there. The purpose of sharding is to reduce the burden on the database and shorten the query time.

6. Create corresponding indexes for the table

Use indexes to quickly access specific information in a database table.

7. Static page

The front desk implements a completely static ***, and there is no need to access the database at all.

8. Cache technology (MemCache, Redis)

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

9. Prohibit external hotlinking

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

10. Control the download of large files

Downloading large files will take up a lot of traffic, and for non-SCSI hard disks, downloading a large number of files will consume CPU, making the website responsive. Therefore, try not to provide large files over 2M for download. If you need to provide them, it is recommended to put the large files on another server.

<<:  Are there fake Gigabit routers? Have you ever avoided these manufacturers' pitfalls?

>>:  What are the advantages of using wireless mesh networks in enterprises?

Recommend

Microsoft is exploring high-speed wireless networks in data centers

In a recent filing with the Federal Communication...

What is OSI model?

Today I tweeted some thoughts about how the OSI m...

HTTP 3 is coming soon

HTTP 3 This is a protocol that has not yet emerge...

5G is here, and your way of playing TikTok should also change

On June 6, 2019, the Ministry of Industry and Inf...

5G commercialization has arrived, how far are 6G and the "terahertz era"?

On October 31, 2019, the three major operators an...

5G+edge computing is in the first stage

On March 3, 2020, GSMA released the report "...

Why 5G networks require a new way of operating

In the 5G reality, network operations are moving ...