Posted on

We’ve Relocated Our Servers

Yesterday I took the site offline for a few hours to move it to a new server. As one might expect, there were a few small glitches, but as far as I can tell, everything is running smoothly now. And the site should be considerably faster, too!

For many years, Take Control Books (as well as the other websites my company owns) ran on virtual private servers (VPSes) provided by a company called Linode. This is a very popular way to host websites, and it seemed to meet our needs well…at first. As time went on, we kept experiencing server crashes and extremely slow performance under heavy loads (for example, whenever we’d have a sale), and I kept upgrading the server to more powerful—and correspondingly more expensive—configurations in order to give us more breathing room. I also did many, many optimizations involving various sorts of caching, database indexing, and so forth. It helped, but not enough. Meanwhile, the monthly cost of running what eventually became three VPS instances skyrocketed.

After several years of paying US $400+ per month for hosting, I decided enough was enough. I ran the numbers, and I discovered that we could buy two maxed-out M2 Mac minis, host (or “colocate”) them at a high-end data center in Toronto, and within less than two years, recoup all our costs and lower our monthly expenses dramatically. Plus, we’d have much higher processing power, complete control over our hardware, and (as a bonus) get to use macOS rather than Linux. (Fun fact: this is not the first, or even second, time I’ve run my websites on Mac servers. Decades ago I even owned an Xserve!)

Each of the Mac minis is, according to benchmark tests, around 50% faster in raw computing power than the most powerful of our old virtual servers. Plus, all the software we’re running is native on Apple silicon, so we get the full benefits of Apple’s chip architecture. I’ve performed even more optimizations to squeeze as much power out of our setup as I can. And, I’ll be watching the stats carefully, continually adjusting and fine-tuning everything as I learn how the new machines function with increasing traffic. We now have lots of options for redistributing resources if and when the need arises.

I wish I could say the process of moving to Mac servers was painless, but that would be a fib. I had expected it to take me a couple of weeks; it actually took about four months from the time I bought the computers to when we switched over our traffic. (To be fair, I also spent a lot of those four months writing and editing books, among other tasks.) Since macOS Server is no longer a thing, I had to obtain all the tools we needed from other places, and go through a lot of nontrivial setup steps—and tons of testing. Taking into account what I’d learned over years of using Linux servers, I made different decisions about software. (It turns out that the readily obtainable stock versions of server apps like Apache and MySQL are not exactly built for speed or flexibility, so I had to choose software carefully do a lot of fiddly custom configuration.) I learned a lot during this process, and even though it was quite time-consuming, it was kind of fun. No, I will not be writing a detailed tutorial on how to use a Mac mini as a server, because life is too short. Sorry.

Anyway, the Take Control Books website is now running on Macs! If any weird behavior occurs, I won’t be completely surprised, although it has been fine in my testing so far, and orders have been flowing in normally. If you do see something that isn’t working as expected, be sure to let me know using the contact form.