Published on February 27, 2014
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
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.
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...
v18.104.22.168. National Lottery ... Daily Million Top Prize is a guaranteed €1 million. ... National Lottery funds good causes around Ireland.
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 ...
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 ...
Developer.com, the Flagship of the ... More Daily Developer News... ... 4 Logical Versus Physical Database Modeling;
Stack Overflow is a community of 4.7 million programmers, ... Join the Stack Overflow community to: ... 0. answers. 3. views. Extract ...
Amazon Web Services ... 25GB of storage and up to 20 million requests ... instantly available gaming backend services for developers that write ...
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
... ('http://ipinfo.io').read) requests.get('http ... in the US and EU handle over 250 million queries per day. ... ipinfo.io Developers Pricing About ...