This architecture is one of the most secure and convenient architectures that I feel personally and is easy for most people to accept:
The front of the LVS and squid, according to the installation method, the Epoll open, configuration files copied, basically the problem is not much.
The difference between this architecture and the APP_SQUID architecture is also the key point: to join the middle-level agent, the benefits of middle-tier agents are too many:
1, gzip compression
Compression can be done through nginx, so that the background application server, whether Apache, resin, lighttpd or even IIS or other wacky server, does not have to consider the problem of compression functionality.
2. Load balancing and fault shielding
Nginx can be used as a load balancer agent and has a fault-masking function, so that a load-balancing strategy based on a directory or even a regular expression becomes a small case.
3, convenient operation and maintenance management, in various circumstances can be flexible programming.
For example, if someone uses a lightweight DDoS to penetrate squid to attack, can be done in the middle of the agent to deal with, traffic and background load mutation, you can at any time a domain name or a directory of requests to throw into the level two cache server ; You can easily control headers such as No-cache and expires. And so on function ...
4. Clear Permissions
This machine is the maintenance personnel who do not write the program, programmers generally do not need to manage this machine, so if there is a failure, it is easy to find the right person.
For the application server and database server, it is best to disappear from the maintenance staff's eyes, my goal is that these services as long as they can run up, and everything else can be disposed of externally.
Web server front-end system built with nginx and squid