Home Backend Development PHP Tutorial Chapter 4, 7 Rewrite Proxy Pattern

Chapter 4, 7 Rewrite Proxy Pattern

Jul 28, 2016 am 08:25 AM
addclass scaling web

1. 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

Chapter 4, 7 Rewrite Proxy Pattern

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.

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

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.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use Nginx web server caddy How to use Nginx web server caddy May 30, 2023 pm 12:19 PM

How to use Nginx web server caddy

Real-time protection against face-blocking barrages on the web (based on machine learning) Real-time protection against face-blocking barrages on the web (based on machine learning) Jun 10, 2023 pm 01:03 PM

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 How to configure nginx to ensure that the frps server and web share port 80 Jun 03, 2023 am 08:19 AM

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 Using Jetty7 for Web server processing in Java API development Jun 18, 2023 am 10:42 AM

Using Jetty7 for Web server processing in Java API development

How to implement form validation for web applications using Golang How to implement form validation for web applications using Golang Jun 24, 2023 am 09:08 AM

How to implement form validation for web applications using Golang

How to enable administrative access from the cockpit web UI How to enable administrative access from the cockpit web UI Mar 20, 2024 pm 06:56 PM

How to enable administrative access from the cockpit web UI

Is PHP front-end or back-end in web development? Is PHP front-end or back-end in web development? Mar 24, 2024 pm 02:18 PM

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

How to solve the problem of nginx hidden version number and WEB server information How to solve the problem of nginx hidden version number and WEB server information May 21, 2023 am 09:13 AM

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

See all articles