1. The problem to be resolved
Placing static content on a networked storage or content distribution service is a technology that handles the load. However, this technique requires you to change the access address of the static content on the network storage and to modify the existing system, such as rewriting the URL address that contains the static content or setting a filter (filters) for the Web server.
2. Description of Cloud Mode
You can change the access address by using a proxy server without modifying the existing system. Set up a proxy server to change the access address of the static content to the address of the network store or content distribution service before the server where the content is saved.
3. Implementation
Use commonly used software like Apache or Nginx to build a proxy server, and then place the proxy server in front of the existing system.
Run a proxy server that can rewrite content (for example, Nginx) on a EC2 instance and place the proxy server between Elb and S3 (for static content).
Add a proxy server rule to modify the URL of the specified content.
If necessary, apply auto Scaling to the proxy server.
4. Configuration
5. Benefits
Using a proxy server to modify the access address allows you to allocate the access load for static content without modifying the existing system.
6. Precautions
In order not to generate a single point of failure, you must ensure that the proxy server is redundant.
Web/ap servers cannot be directly connected to ELB, so even if you increase or decrease the number of WEB/AP servers (EC2 instances) through auto scaling, they still cannot connect directly to Elb.
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above is introduced in the 4th chapter, 7 rewrite proxy mode (Rewrite proxy pattern), including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.