Varnish + nging and squid + Apache Cache

Source: Internet
Author: User
Tags varnish squid proxy

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.