Large volumes of data, high concurrency, and cache can reduce server load and increase client access loading speed
1. the cache server is recommended for use in the Linux operating system, and the Windows operating system is not suitable for use as the cache server in the production environment;
2. in Linux, varnixh + nginx is recommended;
3. Stability is the top priority of the cache server;
I. Multiple caching Methods
1. The development language provides cache APIs for caching, which can be performed at the Development encoding level;
2. The development language and cache server work together with the cached data or files on an independent server, which has a memcached server;
3. cache through reverse proxy. The agent software mainly includes varnish and squid, which can be used for load balancing or file caching;
4. Local cache: Use the HTTP protocol to provide local cache, nginx, Apache, and so on;
Ii. Required Software Version
1. varnish Proxy Server
Windows is not officially recommended for production environments! Therefore, we still use the Linux server and the Linux version.
The software warehouse of each Linux suite already includes varnish. The current version is varnish cache 3.0.3.
2. nginx
Nginx-1.2.8.tar.gz
Or
1. Squid Proxy Server
Linux environment is recommended, current version: squid-3.3.3.tar.gz
Current stable version in Windows: squid-2.7.STABLE8-bin.zip
2. Apache
The Linux package software warehouse has been packaged.
Windows platform: httpd-2.2.24-win32-x86-no_ssl.msi
3. tomcat, IIS
Iii. Architecture
1. the backend Application Server Tomcat and IIS can be used;
2. The local cache uses nginx (or the mod_expires.so module of Apache) for Cache-control and expires configuration control of response;
3. If you request the cached content again from the server after the local cache expires, the varnish (or squid) proxy server is used to cache static files;
Varnish (or squid) receives requests from the client's browser and switches to the nginx (or Apache) server. Then, nginx (or Apache) switches to Tomcat and IIS servers. the cache time set by the varnish (or squid) proxy server is generally greater than the time set by nginx (or Apache) in expires.