5 ms·
I don't really know MongoDB. Memcache seems like a good fit: you could use key names like '{{url}}-{{day}}-{{hour}}' etc, incr/decr is built into the API and ma
by nir 17y ago
I don't really know MongoDB. Memcache seems like a good fit: you could use key names like '{{url}}-{{day}}-{{hour}}' etc, incr/decr is built into the API and make use of its expiration system. Keep in mind that with memcache (AFAIK) you need to know your key names - ie, you can't search for "all keys starting with x" so you might need to keep a table of keys in a SQLish DB.
Perhaps take a look at Google App Engine - it has Memcache built in and is optimized for handling a lot of short requests. It might save you a lot of deployment/scaling headaches.