Configure anti-DDoS protection
API Gateway includes 5 Gbps of basic distributed denial-of-service (DDoS) protection. To defend against high-volume or sophisticated attacks, connect an Anti-DDoS Pro or Anti-DDoS Premium instance to your API group. For more information, see What is Anti-DDoS Pro and Anti-DDoS Premium.
How Anti-DDoS protection works
A distributed denial-of-service (DDoS) attack floods a server with internet traffic. This prevents users from accessing online services and sites. An attacker uses a malicious program to send many fake requests from multiple hijacked computers. These requests consume server resources or network bandwidth. As a result, the server cannot provide services as usual. You can prevent DDoS attacks by configuring and using Anti-DDoS Pro or Anti-DDoS Premium to protect your APIs. For more information, see What is a DDoS attack.
Prerequisites
An Anti-DDoS Pro or Anti-DDoS Premium instance. For more information, see Purchase an Anti-DDoS Pro or Anti-DDoS Premium instance.
An API published in API Gateway.
Connect Anti-DDoS protection to your API group
-
Bind a custom domain name to your API group. For more information, see Call an API using a custom domain name.
ImportantAdd a TXT record when you bind the domain name. This simplifies the subsequent Anti-DDoS configuration.
-
Configure Anti-DDoS Pro or Anti-DDoS Premium. For more information, see Protect website services. When adding a website forwarding rule, set the following parameters:
Website: Enter the custom domain name you bound to the API group in step 1.
Protocol type: Select the protocol for your API. HTTPS is recommended.
Server address: Select Origin domain name and enter the public second-level domain allocated by the API group.
ImportantWhen your dedicated instance is under a DDoS attack, API Gateway notifies you by SMS, internal message, or email.
Requests throttled by API Gateway due to DDoS attacks are not counted in the service level agreement (SLA) statistics for API error rate. Use Anti-DDoS Pro or Anti-DDoS Premium together with API Gateway to protect your business against DDoS attacks.