I'd like to get some insight into how various companies solve counting/incrementing the number of "likes"/"views"/"retweets" or something similar at scale.
At userbases past 50 million monthly active users, I've seen both Redis and Cassandra used to store sets of userIds to quickly retrieve set cardinality (count of viewers, for example). These solutions have some warts but work well and can and are being scaled out. However, I'm curious what other shops use in this case.
Specifically, do the solutions:
- Use sets, or other data structures, or just plain key-value?
- Exact or approximate counts,?
- In-memory only, or hybrid?
- Open source solution, or home grown?
- Has anybody built a lightweight set-only storage system with hyperloglog estimation on top of it?