How GrowingIO Cut AWS Costs: Practical Cloud Cost Optimization Strategies
This article details GrowingIO's systematic approach to reducing AWS expenses by analyzing billing data, tagging resources, visualizing usage, and applying targeted optimizations across EC2 instances, EBS volumes, HDFS storage, network traffic, and S3, while outlining future automation and scaling plans.
Background
Revenue and cost are critical for any company. When an internet business scales, server expenses become a major line item, so GrowingIO—running its platform on AWS—started a cost‑optimization initiative.
Cost Analysis
1. Overview
Before optimization a planning phase based on billing data is required to prioritize actions. AWS billing overview shows EC2 and DataTransfer as the top cost drivers.
Detailed billing files are saved to S3 via Cost Management Preferences.
2. Detailed Analysis
Data Collection
AWS billing provides only aggregated data; detailed line items are stored in S3 for deeper analysis.
Data Tagging
All AWS resources are tagged (e.g.,
user:App) and tags are activated in the cost allocation tags page so they appear in detailed reports.
Data Visualization
Bill data are pre‑processed, split, cleaned, and loaded into PostgreSQL. They are then aggregated by team, application, etc., and visualized with Grafana.
Targeted Optimizations
1. EC2 Instance Optimization
Understanding AWS EC2 pricing models is essential. Reserved Instances (RI) provide 60%+ savings over On‑Demand (OD) for stable workloads. Newer generations (e.g., m5 vs. m4) are cheaper, but kernel upgrades may be required. t3 burstable instances charge based on CPU credits and are ideal for variable load.
AWS offers RI and OD; RI saves ~60% for long‑running services.
Newer instance families (m5) are ~32.5% cheaper than older ones (m4).
t3 instances use a credit system; suitable for workloads with occasional spikes.
Choose instance types based on service characteristics; AMD variants are indicated with an “a”.
Yarn Compute Optimization
Hadoop Yarn’s compute cost dominates. Actions taken include merging small Spark drivers, reducing requested resources, improving data models, and upgrading EC2 types, which together can cut compute costs by over 30%.
2. EBS Storage Optimization
EBS volume types (gp2, st1, sc1, Magnetic) are mapped to HDFS storage classes (Hot, Standard, Archive). gp2 is used for hot data, st1 for standard, and sc1 for archival. Online volume conversion (e.g., gp2 → st1) is possible with a six‑hour cooldown.
3. Traffic Optimization
NAT gateway costs ¥0.427 / hour and ¥0.427 / GB for data processing; outbound data to the Internet costs ¥0.933 / GB. Enabling HTTP/2 header compression by switching ELB to Application Load Balancer reduced outbound traffic by over 30%.
4. S3 Optimization
Keep S3 and EC2 in the same region to avoid inter‑region transfer fees.
Use S3 as a CDN origin for high‑traffic static assets.
Avoid Glacier for non‑archival data due to high access costs.
Regularly delete unused objects.
Future Work
Trim API response headers to further lower outbound traffic.
Leverage Auto Scaling for dynamic resource allocation.
Migrate services to Kubernetes for more efficient scheduling.
Automate billing‑monitoring correlation, generate periodic reports, and conduct reviews to foster cost awareness.
Conclusion
Cost optimization must be tailored to specific business scenarios. The measures described are generic steps GrowingIO applied, balancing cost, performance, stability, and redundancy as an ongoing effort.
GrowingIO Tech Team
The official technical account of GrowingIO, showcasing our tech innovations, experience summaries, and cutting‑edge black‑tech.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.