Games in social networks offer interesting scaling
challenges, as the user base can grow explosively once they
When wooga started work on the facebook game 'Happy
Hospital' in early 2010, we set ourselves an ambitious
goal: "Let's try to scale it to a million players per day
-- with as few servers as possible."
This constraint led us to select Redis as the main backend
storage, running on dedicated (but cheap, consumer-grade)
hardware. As an in-memory database, Redis offers an
order-of-magnitude reduction in query latency, but also
introduces new challenges in the area of durability.
This case study will recount how our backend architecture
has evolved over time, highlight the difficulties we ran
into, describe how they shaped our final setup ... and how
we came up with a new Redis persistence model (diskstore)
on the way.
Find out how many machines you *really* need for a
high-traffic game backend -- even using a 'slow' language