-
Notifications
You must be signed in to change notification settings - Fork 12
Description
The current implementation posts EventCount updates to CloudWatch for every iteration through the main loop in limbo.py. This loops executes once a second, and typically processes no events (and thus posts a zero to CloudWatch). Since CloudWatch charges by the number of times a metric is posted, this is not cost effective. (The AWS free tier supports 1M API calls free per month, including PutMetricData. A single bot running 24x7 all month would generate 2.7M API calls.) This is particularly wasteful because, on the CloudWatch side, since we aren't using "high resolution" events (which cost more), the EventCount metric is aggregated on a minute-wise basis.
A better implementation would do some aggregation of the EventCount metric on the limbo side. A "optimal" solution would seek to post only once every 60s, because that's the aggregation boundary of CloudWatch. A simpler implementation would post once every ten seconds and could probably deliver much of the cost savings with a simpler implementation.