Alibaba Cloud CDN charges you for 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 the failed request is parsed by points of presence (POPs) at the application layer. This topic provides answers to some commonly asked questions about the billing of requests.
A file is cached on the client. Am I charged for the request the second time the client requests the file from the POP?
Yes, you may be charged for the request.
Cause: The second time a file is requested, the POP detects that the file is cached and not updated. The HTTP 304 status code is returned. In this case, you are charged for the request and a small amount of data transfer is generated because the POP returns a small response packet. The fee varies based on the protocol over which requests are sent.
Am I charged when attackers send a large number of requests to my domain name?
Yes, you are charged for the requests.
Cause: 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 resources, and you are charged for the consumed resources. The fees for the requests vary based on whether the IP address blacklist, IP address whitelist, or rate limiting feature is enabled. The following section describes the billing rules:
If the blacklist, whitelist, and rate limiting features are disabled, no IP address is blocked. A large number of requests are sent to POPs and a large amount of data transfer is generated. The requests and data transfer generate high fees.
If the blacklist, whitelist, or rate limiting feature is enabled, the specified IP addresses are blocked. The number of requests sent to POPs and the amount of data transfer generated are significantly reduced. The request and data transfer fees are also reduced. For more information, see Configure an IP address blacklist or whitelist and Configure rate limiting.