Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Is it really the most efficient to deploy WAF to Nginx?

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Nginx is a very good reputation of the reverse proxy, Load Balancer server. It is said that concurrent support can reach 50,000.

Often used when deploying WAF, a common network structure is: Nginx at the forefront, as a reverse proxy, Load Balancer, Nginx behind, is a business server cluster.

This paper verifies whether this method is efficient and how much RPS performance loss there is through practical tests. What if the data points not to Nginx but to WAF itself?

System: Windows

Test use: Nginx, ShareWAF (a WAF product, official website: http://www.sharewaf.com/), ab

Pre-test preparation: use www.test.com domain name, host has been modified for local resolution.

Other: Nginx installed on one computer, ShareWAF installed on another computer (ip: 192.168.1.19), both computers are not high configuration.

1. Nginx configuration is as follows:

3 Load Balancer pointing to:

No Load Balancer, only reverse proxy:

When testing, Nginx will use these two configurations separately.

2、

Make and ab tools test,

ab -c100 -n100 http://www.test.com/

(Modified host, www.test.com points to 127.0.0.1, i.e. native Nginx, Nginx forwards data to WAF)

The test results are as follows:

3、

Use ab to point directly to WAF without Nginx:

4. Conclusion:

ab even nginx, RPS is about 36;

ab directly connected to WAF, RPS is about 86;

Using Nginx as a payload or reverse proxy reduces RPS performance by more than 50%.

Well,

If before accessing WAF, Nginx is used for Load Balancer or Reverse Proxy, followed by Business Server.

When accessing WAF, if you can skip Nginx directly, the efficiency is the highest. That is, WAF replaces nginx. For example, ShareWAF tested above has this function and can replace Nginx.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report