After you enable the log analysis feature for Anti-DDoS Proxy, you can increase or decrease the log storage capacity, or delete all stored logs based on your business requirements.
Prerequisites
Before you begin, make sure that:
The log analysis feature is enabled. For more information, see Use the log analysis feature
Estimate the required log storage capacity
Each request log occupies approximately 2 KB of storage. Use the following formula to estimate the log storage capacity based on the average queries per second (QPS) of your website:
Daily storage = Average QPS x 86,400 x 2 (KB)
Total storage = Daily storage x Retention days
The following table lists the estimated storage requirements for common QPS levels.
| Average QPS | Daily log volume | 180-day log volume | Formula |
|---|---|---|---|
| 10 | ~1.7 GB | ~300 GB | 10 x 86,400 x 2 KB |
| 100 | ~16.6 GB | ~2.9 TB | 100 x 86,400 x 2 KB |
| 500 | ~82 GB | ~14.5 TB | 500 x 86,400 x 2 KB |
| 1,000 | ~165 GB | ~29 TB | 1,000 x 86,400 x 2 KB |
Example: If the average QPS of your website is 500, daily log storage is 500 x 60 x 60 x 24 x 2 = 86,400,000 KB, which is approximately 82 GB. To store 180 days of logs, the required capacity is 86,400,000 x 180 = 15,552,000,000 KB, which is approximately 14.5 TB.
Monitor log storage usage
The log storage usage is displayed in the upper-right corner of the Log Analysis page. On this page, click Upgrade to expand the log storage capacity, or click Delete to remove logs that are no longer needed.
The log storage usage displayed in the Anti-DDoS Proxy console is not updated in real time. The displayed value does not include the usage from the most recent 2 hours.
Storage alerts
During the validity period of the log analysis instance, Anti-DDoS Proxy provides the storage alert feature by default. No manual setup is required.
When log storage usage exceeds 80%, Message Center sends an alert on a daily basis.
When log storage usage falls below 80%, Message Center stops sending alerts.
Best practices
Regularly check log storage usage.
Expand log storage capacity when usage exceeds 70%.
Reduce log storage capacity if a significant amount of storage remains idle for a long period.
Handle exhausted log storage
When log storage is exhausted, new logs cannot be stored and are lost. To resolve this issue:
(Recommended) Increase the log storage capacity. See Increase the log storage capacity.
Delete stored logs and reduce the log storage duration. See Delete logs and Change the storage duration of logs.
Deleting logs permanently removes all stored logs, and the data cannot be recovered. Each Alibaba Cloud account can delete stored logs a maximum of twice. To avoid frequent deletions, increase the log storage capacity at the earliest opportunity.
Increase the log storage capacity
Increase the log storage capacity when the current capacity no longer meets your business requirements.
Log on to the Anti-DDoS Proxy console.
In the top navigation bar, select the region of your instance.
Anti-DDoS Proxy (Chinese Mainland): Choose the Chinese Mainland region.
Anti-DDoS Proxy (Outside Chinese Mainland): Choose the Outside Chinese Mainland region.
In the left-side navigation pane, choose .
In the upper-right corner of the Log Analysis page, click Upgrade.
On the Upgrade/Downgrade page, select a log storage capacity that is greater than the current capacity, then read and confirm the Terms of Service. Example: If the current log storage capacity is 3 TB, select 5 TB or higher.
Click Buy Now and complete the payment.
After the log storage capacity is increased, the new log storage capacity and usage are displayed in the upper-right corner of the Log Analysis page.
Decrease the log storage capacity
Decrease the log storage capacity when the current capacity exceeds your business requirements.
Log on to the Anti-DDoS Proxy console.
In the top navigation bar, select the region of your instance.
Anti-DDoS Proxy (Chinese Mainland): Choose the Chinese Mainland region.
Anti-DDoS Proxy (Outside Chinese Mainland): Choose the Outside Chinese Mainland region.
In the upper-right corner of the Log Analysis page, click Downgrade.
On the Upgrade/Downgrade page, select a log storage capacity that is less than the current capacity, then read and confirm the Terms of Service. Example: If the current log storage capacity is 10 TB, select 5 TB or lower.
Click Buy Now and complete the payment.
After the log storage capacity is decreased, the new log storage capacity and usage are displayed in the upper-right corner of the Log Analysis page.
Delete logs
Delete all stored logs to free up log storage capacity.
This action permanently deletes all stored logs and cannot be undone. Each Alibaba Cloud account can delete stored logs a maximum of twice. To avoid frequent deletions, increase the log storage capacity instead.
Log on to the Anti-DDoS Proxy console.
In the top navigation bar, select the region of your instance.
Anti-DDoS Proxy (Chinese Mainland): Choose the Chinese Mainland region.
Anti-DDoS Proxy (Outside Chinese Mainland): Choose the Outside Chinese Mainland region.
In the left-side navigation pane, choose .
In the upper-right corner of the Log Analysis page, click Delete.
NoteIf no logs are stored, the Delete operation is not supported.
In the Are you sure that you want to delete all logs message, click OK.
After you delete the logs, wait 2 to 3 hours for the updated storage usage to be reflected in the upper-right corner of the Log Analysis page.