-
Notifications
You must be signed in to change notification settings - Fork 16
Cost Optimization
This page explains how to control Alibaba Cloud spend without weakening reliability, security, or engineering productivity.
| Model | Best fit | Watch out for |
|---|---|---|
| Pay-as-you-go | Variable or short-lived workloads | Idle resources still cost money. |
| Subscription | Predictable long-running resources | Overcommitting to oversized capacity. |
| Reserved capacity | Stable baseline usage | Bad fit for uncertain workloads. |
| Savings plans | Predictable spend commitments | Requires usage analysis. |
| Storage plans/lifecycle | Storage-heavy systems | Retrieval and transition costs. |
- Right-size ECS instance families and sizes.
- Stop or delete idle ECS instances.
- Use Auto Scaling for variable workloads.
- Evaluate commitments only after baseline usage is known.
- Remove unused images and snapshots.
- Apply OSS lifecycle rules.
- Delete old snapshots and orphaned disks.
- Use archive classes only for suitable access patterns.
- Compress and partition analytics data.
- Review public egress.
- Use CDN for cacheable assets.
- Avoid unnecessary cross-region transfer.
- Remove unused EIPs.
- Tune queries before scaling vertically.
- Right-size instance class and storage.
- Review read replicas.
- Set backup retention deliberately.
- Set log retention by environment.
- Monitor ingestion volume.
- Avoid debug logs in production unless needed.
- Archive or delete old logs.
- Enforce cost allocation tags.
- Create budget alerts.
- Review untagged spend.
- Assign owners for cleanup.
Data transfer is a common surprise. Review:
- Public internet egress
- Cross-region replication
- CDN origin traffic
- Hybrid connectivity patterns
- Analytics exports
- Backup replication
Logs are valuable, but unmanaged log volume becomes expensive. Define retention by purpose:
| Log type | Suggested thinking |
|---|---|
| Security audit logs | Longer retention based on compliance. |
| Application debug logs | Short retention unless investigating. |
| Access logs | Retain based on analytics and audit value. |
| Data pipeline logs | Retain enough for replay and audit. |
Name, owner, environment:
Compute, storage, database, network, logs:
New services, traffic growth, scaling events:
Rightsizing, lifecycle, cleanup, commitments:
What cost cuts could harm reliability or security?
Actions, owners, due dates:
- Forgetting to delete labs.
- Unused EIPs, disks, snapshots, and databases.
- Overprovisioning RDS or ECS before measuring.
- No lifecycle rules on OSS.
- High log retention for noisy debug logs.
- Buying reserved capacity too early.
- No cost tags.
- Ignoring cross-region and public egress.
"I would first identify the top spend drivers from billing and tags. Then I would remove idle resources such as unused EIPs, disks, snapshots, and test databases. Next I would right-size ECS and database instances based on metrics, apply OSS lifecycle policies, tune log retention, reduce unnecessary data transfer, and use Auto Scaling for variable workloads. For stable baseline usage, I would evaluate subscription, reserved capacity, or savings plans. I would protect reliability by measuring before changes, reviewing production risk, and tracking results through budgets and cost dashboards."
- Create a cost checklist for one lab.
- Identify five cost drivers in a scalable web app.
- Practice the 30% cost reduction interview answer.