Chapter 4, 7 Rewrite Proxy Pattern
Jul 28, 2016 am 08:25 AM1. Problems to be solved
Putting static content on network storage or content distribution services is a technology that handles load. However, this technique requires you to change the access address of static content on the network storage, and requires modifications to the existing system, such as rewriting the URL address containing the static content or setting up filters for the web server.
2. Instructions for cloud mode
You can change the access address by using a proxy server without modifying the existing system. Set up a proxy server in front of the server where the content is saved to change the access address of the static content to the address corresponding to the network storage or content distribution service.
3. Implement
Use common software like Apache or Nginx to build a proxy server, and then put the proxy server in front of the existing system.
Run a proxy server (such as Nginx) that can rewrite content on an EC2 instance, and place the proxy server between ELB and S3 (for static content).
Add proxy server rules to modify the URL of specified content.
Apply Auto Scaling to the proxy server when necessary.
4. Configuration
5. Benefits
Use a proxy server to modify the access address so that the access load of static content can be distributed without modifying the existing system.
6. Precautions
In order to avoid a single point of failure, you must ensure the redundancy of the proxy server.
web/AP servers cannot be directly connected to ELB, so even if the number of web/AP servers (EC2 instances) is increased or decreased through auto scaling, they still cannot be directly connected to ELB.
The above has introduced Chapter 4, 7 Rewrite Proxy Pattern, including relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Real-time protection against face-blocking barrages on the web (based on machine learning)

How to configure nginx to ensure that the frps server and web share port 80

Using Jetty7 for Web server processing in Java API development

How to implement form validation for web applications using Golang

How to enable administrative access from the cockpit web UI

Is PHP front-end or back-end in web development?

How to solve the problem of nginx hidden version number and WEB server information
