MCStats’ move to Digitalocean

A few weeks ago MCStats completed its migration to DigitalOcean.

Moving away from a single dedicated server to multiple smaller “cloud” servers allows MCStats to run much smoother and faster. The SSDs DigitalOcean offers allowed this to happen without any issues.

Before the move it was pretty obvious that there were some issues. The site was slow and graphs were generating poorly. One of the biggest issues was that there seemed to be a connection delay on the single dedicated machine with nginx for some reason, even though there were still plenty of open sockets/files available. Although when processing 2500 requests/second anyone might question if one machine can really handle that. It affected everything else that wasn’t nginx as well.

With the move to multiple “droplets” the backend nodes (processing, mysql, mongo) can be completely separated from the nginx nodes and not use/allow public internet traffic at all. For example, the processing backend:

processing backend bandwidth

As a side bonus, load balancing can be done across multiple nginx droplets using round-robin DNS. It’s not as good as a real load balancer but it works really well and traffic is fairly evenly spread out. For example, this is the graph for 1 of the 3 balancers for the past week:

one load balancer

Each balancer is pretty similar: around 850 requests per second each so it’s quite good. I recently added another balancer to test so I’ll see how that fares 😀

At the end of the day, I’m much happier with DigitalOcean at the moment. The monthly costs are even marginally less than before; they could probably be even lower but I’m not going to go too crazy optimizing that.

2 thoughts on “MCStats’ move to Digitalocean

Leave a Reply

Your email address will not be published. Required fields are marked *