Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

.net how to deal with the pressure of website visit

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you ".net how to deal with the pressure of website access". The content is simple and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn the article ".net how to deal with the pressure of website access".

one。 Front-end page:

1. First of all, reduce the size of resources, if you can use small pictures, use small pictures. Reference a third-party js compressed version of js using mini.

two。 Use CDN to reduce the pressure on server access, put pictures and css,js files on CDN. Users get resources from the cdn cache much faster than they can access the server. (there are also network relationships, cdn network is fast)

3. A time-consuming js can be loaded after an asynchronous request.

two。 Server load balancing:

There are many load balancing solutions, there is no shortage of money, there is no shortage of money, losers have losers. I use nginx load balancing.

Prepare a dedicated nginx load balancing server, use it for load balancing and forward it to 5 business servers. (when the development needs a single debug, use hosts to point to the single)

three。 Server cach

Because of the distributed architecture, the server cache mainly uses memcached and redis (2 each, one primary service and one standby). Both memcached and redis have their own .net versions and are not complicated to use.

Depending on the business needs, I basically use memcached for 70% and need to cache redis for a long time.

Memcached support for Chinese is not good, to save Chinese data, first encode the Chinese base64 in the store, read the time to do base64 decoding.

four。 Database

I mainly use sqlserver and a small number of projects use mysql. 50W visits can be supported by a single sqlserver server. Reduce transactions as much as possible, and services need to be processed with message queues.

Large task websites do not deal with it, but use other programs to deal with it (in response to demanding modification operations, first modify the redis cache, and then the asynchronous program operates the database. )

Log during operation, database crash or website crash can read log file to make up for data operation. (generally speaking, the server will not hang up for a long time, and it will be almost impossible to live if it cannot be recovered for more than a day. Really looking for a solution depending on the specific situation)

The above is all the contents of the article "how to deal with the pressure of website access". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report