After nginx proxy, get the real IP and do concurrent access restriction (current limiting)

When the site is running, in order to prevent DDoS attacks or data bursts caused by internal interface calls, nginx provides a limit current limiting module: HttpLimitZoneModule limits the number of concurrent accesses at the same time. HttpLimitReqModule limits access to data, up to a few requests per second. 1. Normal configuration: What is a […]

Haproxy implements seven-layer load balancing

Table of Contents Haproxy overview haproxy algorithm: Haproxy implements seven-layer load ①Deploy nginx-server test page ②(active/standby) deploy load balancer ③Deploy keepalived for high availability ④Add health check on haproxy ⑤Test Haproxy Overview haproxy—It is mainly used for layer 7 load balancing, but it can also be used for layer 4 load balancing. Apache can also […]

HttpClient-forward proxy and signature verification

Article directory Introduction practice HttpClientBuilder Customized chain of responsibility test Introduction HttpClientBuilder is an http client construction class of Apache. By inheriting the construction class, signature verification can be added, so that signature verification can be carried when sending requests uniformly. Customized MyHttpClientBuilder adds a new link to the chain of responsibility Practice HttpClientBuilder HttpClientBuilder […]

Gin-based HTTP proxy demo

After using TCP to simulate an HTTP proxy last time, I felt that it was still too crude. I wondered if I could use a framework to make something of practical use. So, just thinking about how to use golang’s Gin framework to implement one? Well, you heard it right, it is the gin framework. […]

Spring-dynamic proxy

Dynamic Proxy Proxy pattern: Provide a proxy for other objects to control access to this object, enhance a method in a class, and extend the program. Dynamic proxies can add additional logic to methods in a class without modifying the class source code Creation of proxy objects through cglib: Based on Parent and Child Classes, […]

Nginx implements tcp proxy and supports TLS encryption experiment

Nginx source code compilation Regarding the construction and configuration of nginx, please refer to the author’s previous article: Real-time streaming media server construction test (nginx + rtmp)_How to test online whether the streaming media rtmp is successfully built – the first half of the CSDN blog; the only change is the compilation parameters (Add the […]

Proxy mode (Proxy)

Definition Proxy is a structural design pattern that allows you to provide a replacement for an object or its placeholder. The proxy controls access to the original object and allows some processing before and after the request is submitted to the object. Foreword 1. Question For example: there is such a giant object that consumes […]

Docker configure Nginx reverse proxy

Article directory 1. Deploy the microprogram into docker 1.1 dockerfile 1.2 Create docker image based on customized dockerfile 1.3 Create container 1.4 Testing 2. Install Nginx in docker 2.1 Install Nginx image 2.2 Obtain the Nginx configuration file and synchronize it to the specified location on the host computer Install nginx container Delete nginx container […]

Redis Twemproxy cluster, horizontal expansion, expansion plan

Article directory I. Overview 2. Twemproxy distribution mode 3. Test planning 4. Redis service instance preparation 4.1 Configure Redis instance 4.2 Create related resources 4.3 Start the Redis service instance 5. Twemproxy installation preparation 6. Twemproxy installation and cluster configuration 6.1 Install Twemproxy 6.2 Configuring Twemproxy 6.3 Start twemproxy 6.4 Testing the twemproxy cluster If […]