Should you host on the Amazon cloud?

A lot of people lately have been telling me to move into the cloud and I have been talking about this with many developers — both OpenSimulator and web server development as well. Most of them, in both groups, agree with me that the cloud is just not great for traditional usage. But that only applies to traditional usage. We all agree that there are some really amazing uses for the cloud.

First, I want to compare the difference of hosting a simulator on a cloud instance versus a dedicated server instance. It is documented that the standard usage of an OpenSim region of 15,000 prims and 2,000 scripts should run comfortably with about 1 gigabyte. So let’s compare the prices of running a region for a continuous month on both cloud and dedicated hardware.

Cloud:

  • Specs: 1.7 Gb RAM, 160 Instance Storage, 1 CPU Core
  • Base Cost: $0.06 per hour
  • Bandwidth: $0.01 per gigabyte
  • Access to storage: $0.10 per million requests
  • Storage $0.10 per per gigabyte per month
  • Total Per Month: $48

Traditional server:

  • Specs: 8gb RAM, 2 TB Storage, 2 CPU Cores
  • Base Cost $30.00 per month
  • Bandwidth: unlimited at no extra cost
  • Access to storage: unlimited at no extra cost
  • Storage: 2 terabytes at no extra cost
  • Total Per Month: $30

The examples above use Amazon’s On Demand instances, with no setup costs, and a traditional server provider that has no contract required.  You can get better prices with contracts with both Amazon and dedicated server providers.

However, these prices are variable based on who you get your traditional server from and whether you use on-demand or reserved instances on Amazon. Or, if you are feeling risky enough, you could use spot instances from Amazon which are priced crazy low, but do not have guaranteed up-time.

For me, the biggest issues are the unlimited bandwidth and bandwidth speed caps. A common thing that many people do not realize is that international connections can be very slow.  One of the advantages of Amazon is that you can clone instances in locations closest to your clients — but the same can be done with traditional data centers that have worldwide locations. It is just simply a faster process with Amazon servers.

So far, Amazon price of $48 doesn’t look too far apart from the traditional server price of $30. But if you look closely at the specs, the Amazon setup is designed to be just enough to run a typical single region. The traditional server, however, has almost four times the RAM and twice the computing power — enough to hold several regions. Now the price differential becomes much more significant.

But you can look at it another, way, too. Many regions are empty most of the time. Say you use a region for only 72 hours over the course of a month and shut it down the rest of the time. Now the price adds up to just $5, since Amazon bills based on usage.

Scaling

One of the biggest things that I really hate hearing from people is that companies have to move into the cloud to scale. This is simply untrue. The cloud does make it very simple to ramp up and down based on needs, much easier than with dedicated servers, but you can still scale with traditional vendors just fine.

Lets take an example of a grid that has been around for a long time and has accumulated a large database of assets and inventory — and has suddenly seen a dramatic spike in traffic, resulting in network overload. There are multiple ways to solve this issue. Many times it is fault with the program’s inability to handle the stress.

For example, OpenSim’s services become exhausted quite easily as they rely on an old server client built into OpenSim to handle the requests and responses. One solution to this is to set up reverse proxies, and replace the existing built-in web server with a low overhead server such as NGINX that can take the hits and still keep ticking. But when that is not enough, it is time to upgrade and add another server. You can even cluster them, linking the two servers together, either over the Internet or within the same data center. Then you can replicate the data and balance the traffic between the two servers.

Cloud hosting offers a simpler solution, using Amazon’s Elastic Cloud Load Balancing service. It would automatically spin up more copies of your simulator when usage increases. That makes it much simpler to maintain but can increase costs.

Depending on your needs, the cloud could be cheaper if you only get busy once in a great while. However,a second server could be better if you see frequent busy periods, or have just grown to the point where you need more capacity.

Pros and cons

This wouldn’t be a true “versus” article without a bit of pros and cons.

Pros and cons of dedicated servers

  • Pros: Fixed pricing
  • Cons: Does not dynamically scale
  • Pros:  Normally unlimited bandwidth
  • Cons: Sometimes, bandwidth is not unlimited
  • Pros: Can Be Physically Owned
  • Cons: Hardware Issues Can Occur

Pros and cons of cloud services

  • Pros: Can dynamically scale
  • Cons: Pricing is not fixed
  • Pros:  Can save by not paying for unused time
  • Cons: Pay for all aspects of instances
  • Pros: Can be created instantly
  • Cons: Cannot be physically owned
  • Pros:  Can restart in different data denter if problems occur
  • Cons: Not ideal for full time usage

Closing Thoughts

I personally prefer using dedicated servers. I like to physically own my hardware. It greatly reduces costs since all I have to pay for each month is rack rental fees. If hardware issues arise, I just purchase replacement hardware. I have taken classes in networking, and I know how to network servers together securely and utilize all the space even on servers that primarily used for regions. I use extra space for redundant storage using back end sync tools. I can manage load balancing using DNS and reverse proxy tools and can scale infinitely using these multiple tools and network attached storage.

Now as far as cloud instances go, they are amazing for throwing parties, for running things for a short time with a lot of power. Personally, I still use dedicated servers in these cases, but I can see that cloud instances can be very powerful for that. The main purposes I use cloud instances for is to spin up test servers. There’s no need to order a whole dedicated machine to run tests on, just spin up a cloud server to run tests and toss it in the trash if it fails, or move it off the cloud to a traditional server if it goes well.

The question of cloud versus dedicated is about which is better, which which you actually need.

The biggest example of OpenSim cloud hosting is Kitely. The take advantage of the fact that not many people are ever online all the time, and don’t need their regions to be up and running around the clock. Instead, they just have regions online when people are visiting them. This is a great concept.

But for traditional grids, with regions up and running all the time, cloud isn’t the best possible option.

timothy.f.rogers@gmail.com'
Latest posts by Timothy Rogers (see all)