Design a distributed counter for many users
Many users increment shared counters concurrently. Start with a correct single-process counter with locking, then design it for many servers: atomic increments in a database, sharded counters that are summed on read, batching, and the trade-off between exact and eventually consistent counts.
No answer yet. Write the first one; the best answer gets endorsed.
