When you are looking at cloud options and begin designing the back end of your application or website, there are often a few questions newer folks have regarding choosing the server flavor (a flavor is a combination of RAM, CPU, disk size, and network throughput) and operating system.
Choosing specifications for your server is not the same as picking out a laptop or desktop–the usage of your server tends to be a lot more varied than what a home computer does, and it’s almost always part of a larger system of devices that have to work together efficiently. For home computers, you can simply plug in a search keyword like “gaming” or “web browsing” and quickly get a list of reviews, recommendations with similar minimum specs. For your servers, you’ll want to spend some time considering things like what software you’re running and some particulars about your exact situation, and then follow up on what you pick with monitoring so you can adjust your servers as needed.
In this article, I will cover some basic terms used to talk about server specifications, some common mistakes people make when trying to determine the requirements for their cloud servers, and I’ll describe some important points you want to consider before you throw your money into cloud options that don’t fit your needs.
So many images, so many solutions
Those of you that are new to clouding might be a bit confused about the difference between images and flavors. Images are the base OS you will be using for your cloud solution, for example, Ubuntu 19.04 would be an image available. A flavor is a name for the initial group of resources given to the server. For example, 2 GB of RAM and 1vCPU(virtual CPU) would be a flavor, to which you could apply your choice of images.
One (giant) server to rule them all
One of the first pitfalls I often see is when cloud hosting customers want the beefiest virtual server money can buy, with all the RAM and CPUs. Naturally, more RAM and CPU equals more productivity! Not only can this lead to overspending, but it can cause you some pain later on if you need to scale back. Because Cloud Servers (and virtual machines across most cloud providers) cannot be downgraded directly, to reduce the size of your single device would require time-consuming and costly migrations to a smaller instance . Plus, if you blow your entire budget on your one, powerful cloud server, then you may not have left any wiggle room to create a properly redundant environment, where you have at least two servers ready to handle work, should any one of them run into major issues.
The little test server that couldn’t
Some newcomers have the opposite misconception–they’ll pick the smallest, cheapest set of specs to test out the basics like how to use the control panel or the API or to perform some test configurations. When this becomes a problem, however, is when someone takes a “set it and forget it” attitude to choosing their specs, drops their website onto this same small server, and then doesn’t revisit it again until there’s a major outage to bring their attention back to it. While building tiny is easy on your wallet at first, building something too small, and especially building something small and not monitoring it closely, can leave you scrambling to react to a disaster, rather than being proactive and scaling up before servers become overwhelmed.
What’s good around the office is just as good for a server
Though most people who are ready to build servers in a cloud environment will have some idea what operating system and distribution they want to use, there are still a few folks who are working out of small businesses or just starting out on developing software, who might be facing this decision for the first time. These people are tempted to use the same OS as they have on their home computers and local office desktops because it’s what they are familiar with when in reality they should be exploring all options and focus on exactly what the server’s workload will be. For example, a small business may consider running their new cloud server-based website on Windows IIS, because they all use Windows desktop machines and want to use a graphical user interface to manage the content files for that website. There could be more cost-effective solution by running a few small Linux servers using Apache. Dashboard programs like cockpit can be used via a web browser, and graphical desktop packages like Gnome can be installed to Linux servers directly, and accessed over a remote connection through tools like VNC.
So what’s right for you?
When deciding which image and flavor to choose from, take into account the type of work being done on your server. Will you be running a WordPress site or are you standing up a web application that requires lots of backend processes to be running. If you are running a simple website, you probably don’t need that 60 GB of memory. Instead, I would recommend using a few small servers to you can have redundancy and keep the site running should any one of them fail. Similarly, usually, only larger productions require those large resource-heavy servers, such as hosting websites with very high traffic, processing video, or 3D graphics rendering.
The general rule of thumb is to always have multiple servers each handling a portion of the workload as opposed to one server to handle it all. If your small servers prove to be too small, you’re now free to scale up through resizing or adding more nodes without creating downtime.
Next, consider the bottlenecks of your environment. For example, your application could run just fine with the RAM and CPU on a small flavor, but require a lot of networking throughput. In this case, moving up to a medium-sized flavor will provide you with more bandwidth throughput per server, meaning your high-bandwidth application would benefit from two medium servers behind a load balancer, rather than four of the small size.
Many websites and other workloads rely on popular software, such as CMS packages, that come with their own published minimum requirements to run. While this is a great starting point, be sure to take into consideration what other demands you’re putting on the software, such as WordPress plugins or Magento extensions. Many software basic requirements don’t take into account how many site visitors are expected, only what’s necessary to get it working for you as the developer, so it’s always important to monitor and adjust what the requirements will be for your real-world application of that software.
On a rare occasion, I see newcomers asking for guidance on what OS is the “best one” for servers overall rather than looking for guidance on flavors or specs. In my humble opinion, for the accessibility, price, and community I recommend choosing Linux-based images for cloud solutions. Some are afraid of shifting from their tried and trusted OS, but there are a lot of benefits in going with Linux, and for any problem I have experienced there is a manual, a community discussion, or a Q&A section with an answer.
In summary, though every situation is different and only you will know your server usage situation thoroughly, here are some of the most important topics to keep in mind:
- be sure not to fall for the common misconceptions: too big, too small, picking an OS that may be better for personal use than server
- consider the real-world specs for things like CMS’s, you may need something bigger than the published minimum requirements
- identify bottlenecks and pick a size that alleviates those first
- horizontal scaling is easier than vertical scaling, especially if you need to scale down
- single servers are a single point of failure, always create servers in multiples