Recently in the memcached of the common course, found that memcache is really a good thing, can significantly reduce the database load, we have to understand that any of the same technology has its advantages and disadvantages,
In the use of it, to understand its application of the scene, to avoid weaknesses, to play the greatest role.
for memcached business scenarios:
1) If the site contains dynamic Web pages that are heavily accessed, the load on the database will be high. Because most database requests are read, memcached can significantly reduce the database load.
2) If the database server has a low load but high CPU usage, you can cache the computed results (computed objects) and the rendered page template (enderred templates).
3) Use memcached to cache session data , temporary data to reduce write operations to their database.
4) caches some small but frequently accessed files.
5) caches the results of web ' services ' (non-IBM advertised Web services, translator notes) or RSS feeds.
does not work with Memcached's business scenario:
1) The size of the cached object is greater than 1mb
Memcached itself is not designed to handle huge multimedia (large media) and huge binary blocks (streaming huge blobs).
2) The length of the key is greater than 250 characters
3) The virtual host does not allow the memcached service to run
If the application itself is hosted on a low-end virtual private server, such virtualization technologies like VMware, such as Xen, are not suitable for running memcached. Memcached needs to take over and control large chunks of memory, if Memcached manages memory , and
is swapped out by OS or hypervisor, memcached performance will be compromised.
4) The application runs in an insecure environment;
Memcached to provide any security policy, you can access memcached only through Telnet. If your app is running on a shared system, you need to focus on security issues.
5) The business itself needs data that is persisted or needs to be database
Memcached Applicable Scenarios