Improve storage solution + Track Global Stats by Hour of Day (by Country) and by Day
Opened this issue · 0 comments
Per day tracking (new)
730 entries (365 * 2) for JS/No JS if tracking by day, so no more than around 35kb per year
Per hour tracking by country by year (new)
254 countries * 24 hours * 2 (JS/No JS) = 12,192, so no more than around 595kb per year
Per country racking by month per app
Assuming 50% of countries tracked = 127
127 * 2 (JS/No JS) * 12 = 150kb per app
Per month global tracking
Assuming 100% of countries tracked = 254
254 * 2 (JS/No JS) * 12 = 300kb
Assuming 100 apps tracked
Global: 35kb + 595kb + 300kb = 930kb
Apps (100): 150kb * 100 = 14.6MB
Summary
15MB per year is needed if app usage is low
Our free 20MB Redis instance on https://addons.heroku.com/rediscloud won't last long.
If we rose to 10,000 apps tracked we'd need to upgrade to a beefy instance, $100 per month just to get us through year 1. Clearly a better solution for historical stats is needed.
Assumption is that each key takes 50 bytes