Scenario: A smart city deploys 10,000 environmental sensors (temperature, humidity, air quality, noise) reporting every 30 seconds. Calculate bandwidth and cloud costs for cloud-only vs edge-processing architectures.
Given Data:
- 10,000 sensors across the city
- Reporting interval: 30 seconds
- Payload per reading: 250 bytes (JSON: sensor ID, timestamp, 4 measurements + metadata)
- Cellular data cost: $0.10/MB
- Cloud processing cost: $0.000002 per message (AWS IoT Core)
- Edge gateway: $500 each, processes 500 sensors, filters/aggregates data
Architecture 1: Cloud-Only (No Edge Processing)
Step 1: Calculate Message Rate
- Messages per hour: 10,000 sensors × (3,600s / 30s) = 10,000 × 120 = 1,200,000 messages/hour
- Messages per month: 1,200,000 × 24 × 30 = 864,000,000 messages/month
Step 2: Calculate Bandwidth
- Data per month: 864M messages × 250 bytes = 216,000 MB = 216 GB/month
- Bandwidth cost: 216 GB × 1,024 MB/GB × $0.10/MB = $22,118/month
Step 3: Calculate Cloud Processing Cost
- Processing cost: 864M messages × $0.000002 = $1,728/month
Total Cloud-Only Cost: $22,118 + $1,728 = $23,846/month
Architecture 2: Edge Processing with Aggregation
Edge gateways perform local processing: - Filter: Remove duplicate readings (sensors report unchanged values → drop 40% of messages) - Aggregate: Send zone averages every 5 minutes instead of per-sensor readings (10x reduction) - Anomaly alerts: Forward only readings outside normal ranges (5% of total)
Step 1: Calculate Effective Message Reduction
- Original: 1,200,000 messages/hour
- After filtering (40% removed): 1,200,000 × 0.6 = 720,000 messages/hour
- Zone aggregation: 10,000 sensors ÷ 100 sensors per zone = 100 zones; 100 zones × (3,600s / 300s) = 1,200 aggregate messages/hour (600x reduction for normal data)
- Anomaly alerts (5% of filtered): 720,000 × 0.05 = 36,000 messages/hour
Total messages to cloud: 1,200 (aggregates) + 36,000 (alerts) = 37,200 messages/hour - Monthly: 37,200 × 24 × 30 = 26,784,000 messages/month (97% reduction vs cloud-only)
Step 2: Calculate Bandwidth
- Aggregates: 1,200 msg/hr × 150 bytes (smaller payload) × 24 × 30 = 129.6 MB/month
- Alerts: 36,000 msg/hr × 250 bytes × 24 × 30 = 6,480 MB/month
- Total bandwidth: 6,609.6 MB = 6.45 GB/month (97% reduction)
- Bandwidth cost: 6.45 GB × 1,024 MB/GB × $0.10/MB = $661/month
Step 3: Calculate Cloud Processing Cost
- Processing cost: 26.78M messages × $0.000002 = $54/month
Step 4: Calculate Edge Infrastructure Cost
- Gateways needed: 10,000 sensors ÷ 500 per gateway = 20 gateways
- Gateway cost: 20 × $500 = $10,000 (one-time)
- Amortized over 3 years: $10,000 ÷ 36 months = $278/month
Total Edge Architecture Cost: $661 + $54 + $278 = $993/month
Comparison Summary:
| Cloud-Only |
$23,846 |
216 GB |
864 million |
Baseline |
| Edge Processing |
$993 |
6.45 GB |
26.8 million |
$22,853/month (96% savings) |
Payback Period: $10,000 gateway investment ÷ $22,853 monthly savings = 0.44 months (13 days)
Decision: Deploy edge gateways with local filtering and aggregation. The 96% cost reduction and 13-day payback make edge processing a clear winner. Additionally, edge processing provides local resilience (sensors continue reporting locally during internet outages).
Edge processing bandwidth savings scale with message reduction ratio and device count. \(\text{Monthly savings} = (N_{\text{devices}} \times \text{msg rate} \times (1 - \text{reduction ratio}) - \text{gateway cost}) \times \text{cost/msg}\) Worked example: 10,000 sensors x 120 msg/hr x (1 - 0.969) x 24 x 30 x $0.000002 + bandwidth savings = $22,853/month saved with 97% message reduction through edge aggregation and filtering.