If you want to use Web Application Firewall (WAF) to protect your web services, you must add your web services to WAF. You can add your web services to WAF 3.0 in cloud native mode or CNAME record mode. You can select a mode based on the deployment model of your web services. This topic describes the implementation, recommended scenarios, protected objects, and access methods of the cloud native mode and CNAME record mode.
Comparison
Item | Cloud native mode | CNAME record mode | |
SDK integration mode | Reverse proxy mode | ||
Implementation |
|
|
|
Recommended scenarios | If you use the following Alibaba Cloud services for your web services, we recommend that you add your web services to WAF in this mode: Application Load Balancer (ALB), Microservices Engine (MSE), and Function Compute. | If you use Alibaba Cloud Classic Load Balancer (CLB) or Elastic Compute Service (ECS) for your web services, we recommend that you add your web services to WAF in this mode. | If you do not use ALB, MSE, Function Compute, CLB, or ECS for your web services, you can add your web services to WAF in CNAME record mode. |
Protected objects |
| CLB or ECS instances, including all domain names that are hosted on the instances. | Domain names. |
Access methods |
| In the WAF console, add the traffic redirection ports of CLB instances or ECS instances to WAF. For more information, see Add a Layer 7 CLB instance to WAF, Add a Layer 4 CLB instance to WAF, and Add an ECS instance to WAF. |
|