Die Another Day: Scaling from 0 to 4 million daily requests as a lone developer by Cristian Planas

33 %
67 %
Information about Die Another Day: Scaling from 0 to 4 million daily requests as a lone...

Published on February 27, 2014

Author: itnig



Scaling an app includes many different skills: from writing good code to system administration and architecture.

This are the slides of Cristian Planas talk, that took place at itnig on February 20th. Cristian is co-founder & CTO at Playfulbet, and he explained some basic lessons taken from the case of Playfulbet, a social game with more than 150.000 registered users.

Die Another Day Scaling from 0 to 4M requests per day as a lone developer

I am Cristian… Gawyn @crplanas

… and this is the story of how Playfulbet is growing.

The growth of Playfulbet is not so spectacular. 1.5M daily pageviews 4M daily requests

But the interesting part of this story is the small resources we had. This is not only the story of how Playfulbet grows, but how I grow.

Me, scaling in October 2012

Me, scaling in February 2014

The difference? One week of October 2012 v. One week of February 2014

We are going to talk about different techniques for scaling.

But first, we need to understand how an app works.

The Restaurant Analogy

Requests = Customers Waiters = Application instances Food = Data

So you want to scale your application? Meet your next best friend:

The application graph

The browser graph

What happens when something goes wrong

There are 2 ways for improving load time: 1. Improve app performance 2. Improve your architecture

Improving performance

The basic basics - Use indexes in your DB. - Optimize your queries: eager loading, pluck….

Cache In Playfulbet we use memcached.

Materialize Use the DB –or another resource- to create a shortcut to the data you need.

An example A bet is made on an option. An option exists on a market. A market exists on an event. An event exists on a competition. A competition exists on a sport. All the bets should show an icon depending of the sport.

Fake if it’s necessary. The accuracy of some data is critical. But the accuracy of all data is not always critical.

Improving the architecture

In the beginning there was only one server. His name is…

But the load was too heavy. So Maradona needed some help in the back.

Obviously, our staging server also has a cool name.

At this point we decided to move our DB to Amazon. Good: You don’t need to manage it yourself. Bad: Latency.

The structure kept growing.

Our current structure Proxy Chat SSL Memcached 25 “Frontal” servers 3 “Back” servers Redis

But this structure can’t continue. 1. Our DB has performance problems. 2. There are cheaper alternatives. 3. VPS don’t scale CPU.

In the very near future: 1. We are moving to dedicated servers. 2. We will use slave DBs for reads. 3. We will have someone in charge of the system administration.

So this is the end of me as the only technical guy in Playfulbet. And this is why I wanted to share this story with you.


Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

National Lottery ie

v1.3.0.2. National Lottery ... Daily Million Top Prize is a guaranteed €1 million. ... National Lottery funds good causes around Ireland.
Read more

Esdeveniments de Enginyeria | itnig

We'll have one presentation from João Alves, Software Engineer at Blueliv: Every day thousands of companies worldwide are affected by cy... Més ...
Read more

Project Management for Construction: Cost Estimation

Cost Estimation 5.1 Costs ... day: 6,300: 0.10: ... plant with a capacity of 50 million gallons per day completed 1981 for a new town in Colorado was $4.5 ...
Read more Technical Information for Software Developers, the Flagship of the ... More Daily Developer News... ... 4 Logical Versus Physical Database Modeling;
Read more

Stack Overflow

Stack Overflow is a community of 4.7 million programmers, ... Join the Stack Overflow community to: ... 0. answers. 3. views. Extract ...
Read more

Amazon Web Services (AWS) - Cloud Computing Services

Amazon Web Services ... 25GB of storage and up to 20 million requests ... instantly available gaming backend services for developers that write ...
Read more

Anthem, Inc.

Anthem Reports Fourth Quarter and Full Year 2015 Results Anthem Board of Directors Names President and CEO Joseph R. Swedish as Chairman of the Board
Read more

... ('').read) requests.get('http ... in the US and EU handle over 250 million queries per day. ... Developers Pricing About ...
Read more