I'm setting up a service that is meant to query, via a rate-limited API, a number of posts in real-time. Now, some of these posts can be several months old, and they should really only be queried, say, a few times a day once they reach an age where they're unlikely to see new activity: most of my queries should be spent polling new posts.
How can I structure an algorithm to pick the next post to query that weights newer / more active posts higher than older ones, while still querying older posts at a reasonable sample rate?