Database Cache Optimization Guide's website, CDN and cloud storage

Original link: http://www.cnblogs.com/guoyongrong/p/3338135.html

1 database cache.

Common practice is to do with the memory cache, the contents of the database memory read out in advance, and then when the user requests, not directly read the database, but read data in memory, thus easing the pressure on the database.

Over the past more commonly used software cache is memcached, is now more popular redis. Both are in the form of key-value data stored in memory.

We also have an optimization technique is to put all dynamic documents, such as articles, generates a static HTML file, so when the user visits and does not need to read the database directly, but reads the static HTML pages from your hard disk .

3 CDN

But the site really want to improve access speed, there is a more important way is to make use CDN, the static files are cached to the site's CDN service provider's network in order to achieve accelerated.

CDN stands for "content delivery network" is the use of caching technology, some files are cached in the CDN nodes across the country, so that users of the site do not need to access the server to obtain content directly from the nearest node in.

CDN currently used has become a medium-sized Internet company's standard configuration.

There are two main benefits of using a CDN, one picture, js, css, flash and other static resources are consumed by 80% of site traffic, the use of CDN, the 80% of the traffic on the savings,

Thus easing the bandwidth consumption own server; the second is the site users will get static resources directly in the nearest CDN node, without accessing the server station source - 

Such as Hunan Telecom users can take a picture, js, css, etc. from CDN nodes in Hunan Telecom, without having to access the remote source station in the United States - 

Which allows access speed of the entire site to be about 80% increase.

According to want to consider using cloud storage. This can take up hard disk space to save pictures and other content to the largest cloud storage without taking up local hard disk space.

Some cloud storage also with the CDN capabilities. At present, there are more popular cloud storage and cloud shot, seven cows, Ali cloud OSS and so on.

Reproduced in: https: //www.cnblogs.com/guoyongrong/p/3338135.html

Guess you like

Origin blog.csdn.net/weixin_30919571/article/details/94794539