An unexpected load test

A few days ago, there was a post on /r/Minecraft.┬áSomeone put up a 1.4GB world file. It was a scale model of the Earth. It got more popular than they expected, and they hit bandwidth limits on free sites, so I offered to host it for them, with no limitations. It peaked somewhere around 85 downloads. Although my internet upload was saturated, I didn’t really mind. By the next morning, I was down to only 5 or 6 concurrent downloads(I keep a window open on one of my screens that checks every 2 seconds). I thought my 5 seconds of fame were over.

But then the concurrent connections count started rising again. Within a minute it was back up to 20, then 30, then 40. I was extremely baffled, so I thought to google the link to the file on my server. It led to the description of a youtube video, which had been posted 15 minutes ago by this point. I checked and he had just over a million subscribers! The download count kept rising, up to 118 concurrent downloads.

I didn’t mind, but there were a few problems. First of all, I didn’t want the file hotlinked, so I set up a rewrite rule(301) to redirect from the file(Which was hotlinked on a different domain, a website purely dedicated to silly things my math teacher says) to a page on my blog, with a link to the file in the post. It was a pretty short post, the youtuber was french so I didn’t want to hide the download link too much. I had that fixed in a few minutes, but I still had another problem.

The server was taking 4-5 seconds to load the math teacher site, which was purely static HTML and an image, and was timing out to reach my blog(WordPress + https). The CPU and RAM of the web server weren’t anywhere near maxed. It turns out the problem was in apache’s config: “MaxClients” was set to its default of 150. I increased it to 500, and immediately, load times went away, and everything was back to normal. Apache2 peaked around 180 processes, if I remember correctly.

This was all yesterday. It seems to have died down now. I made a dollar from adsense for all my hard work. c: (Kidding of course, it was a lot of fun for me, especially having my homelab being used by so many people, and I’d gladly do it again!)