Alibaba Cloud CDN bills requests based on the number of log entries collected at the application layer (Layer 7). A request that fails to retrieve resources is still counted as one request because even a failed request is parsed by CDN edge nodes at the application layer. This topic provides answers to some frequently asked questions about the billing of requests.

A file has been cached on the client. Is the request billed when the client requests the file from the CDN edge node for the second time?

Yes, the request is billed.

Reason: The second time a file is requested, the CDN edge node detects that the file is cached and not updated. An HTTP 304 status code is returned. In this case, the request is billed and a small amount of data transfer is generated because the CDN edge node returns a small response packet.

Am I charged if attackers send a large number of requests to my domain name?

Yes, you are charged if attackers send a large number of requests to your domain name.

Reason: If an attacker sends a large number of requests to your domain name, Alibaba Cloud CDN mitigates the attacks at the application layer. The mitigation of attacks consumes CDN resources and you are charged for the consumed resources. The fees incurred by requests are based on whether the blacklist, whitelist, or rate limiting feature is enabled. The billing rules are:
  • If the blacklist, whitelist, and rate limiting features are disabled, no IP address is blocked. A large number of requests are sent to CDN edge nodes and a large amount of data transfer is generated. The requests and data transfer incur high fees.
  • If the blacklist, whitelist, or rate limiting feature is enabled, the specified IP addresses are blocked. The number of requests sent to CDN edge nodes and the amount of data transfer generated are significantly reduced. The request and data transfer fees are also reduced. For more information about how to enable the blacklist, whitelist, or rate limiting feature, see Configure an IP blacklist or whitelist and Configure rate limiting.