Design a system that ranks top k shared posts in 5mins, 1 hour, 1 day and 1 week. How to do it efficiently?