Where should the product be hosted?

After salaries, hosting is typically the biggest expense for a tech product company. Most teams just choose Amazon believing that it is the best and most cost-effective option.

Let’s take an example server config and compare the cost across a few providers.

HetznerDigitalOceanAmazonAmazon
vCPU4644
RAM16 GB16 GB16 GB16 GB
Disk160 GB320 GB160 GB160GB
Traffic20 TB6 TB5 TB0.5 TB
Cost~$18$80~$600~$200

At Amazon, the disk and traffic can be customized. I have selected 160 GB disk and 5 TB traffic for comparison. I have also added another option with 0.5 TB traffic since most common use cases will not need more than that.

As we can see, Amazon costs more than 10x compared to Hetzner, and more than 30x for use cases which need high traffic. So should the Frugal Tech Startup just use Hetzner? Not necessarily. There are many ways in which Amazon provides more value compared to Hetzner.

  • Reliability. The cloud is ultimately backed by physical servers, which will eventually fail. It is not a question of if a server will fail, but when. At Hetzner, if the hardware hosting an instance fails, then the application goes down and probably the data stored on the server will be lost. There are options to create backups and snapshots, but they are not real time and need manual intervention for the server to be brought back up. At Amazon, the data is stored on EBS which replicates the data on multiple servers. In case of hardware failure, Amazon will automatically migrate the load to another server. In most cases, this will be completely transparent. In some rare cases the server may reboot, but no manual intervention will be required.
  • Quality. Amazon can be expected to just work far more often than Hetzner. For example, Amazon has its own worldwide network and direct connections with most large ISPs worldwide. Hetzner on the other hand, has great connectivity for users in Europe since it is based out of Germany but users elsewhere may sometimes not get the best possible experience due to congestion.
  • Customization. Amazon provides a lot of flexibility to allow purchase of exactly what is needed. If an application needs more disk space and less CPU, then that’s possible. Also, traffic is charged based on actual usage, so applications with low traffic usage benefit from lower cost.
  • Pricing Flexibility. Amazon provides significant savings for long term commitments. Discounts of ~50% are available depending on what exactly we are committing to and for how long. The flip side is that we may get stuck with servers which we do not need since the needs of a startup will evolve fairly rapidly.
  • Locations. Hetzner has datacenters only in Germany and Finland. Amazon has data centers all over the world. For some use cases, the location of the server is important due to regulatory or latency reasons. In such cases, Amazon is typically better.
  • Managed Services. Hetzner only provides servers, while Amazon has many services. Want a database, there is RDS which takes the pain out of maintaining a database by automating the common tasks like monitoring, updates, backups etc. There are similar services available for almost every component of a modern tech stack.
  • Free Credits. Amazon runs many programs to help startups with free credits. The most popular is AWS Activate which gives up to $100k in credits. There is also a free tier which allows limited usage of some services for free.

DigitalOcean is somewhere in between Hetzner and Amazon in almost every way.

When we compared the cost of Amazon, DigitalOcean and Hetzner earlier and concluded that Amazon is 10x to 30x more expensive than Hetzner, then we were actually comparing apples with oranges. The reality is, as always, much more complex. We need to decide on a case-by-case basis which is the right choice.

In general, Hetzner is a good choice for experiments and use cases where occassional performance issues or downtime can be tolerated. For critical workloads, DigitalOcean or Amazon should be used. Most startups should begin their journey at Hetzner, move to DigitalOcean once they reach a stage where managed services and better reliability are required and eventually to Amazon as the usage increases and the product becomes more complex. If you use a mix of different providers, then be careful of how much data you transfer between the providers – the traffic cost may sometimes negate most of the savings.

I have restricted the discussion to providers selling cloud servers, or at least virtual machines. We can also rent dedicated servers, which will typically be cheaper, but we need to know what we are doing. Those who are not already familiar with managing dedicated servers, should ideally avoid them.

This post should have hopefully convinced you that Amazon is not the only choice for hosting. There are alternatives at different price points, and we should carefully choose our hosting partner depending on our current needs.

I have used Hetzner as the representative of a class of hosting providers who are cheap, but good enough. DigitalOcean is used as the representative of providers with comparatively higher levels of reliability and also some basic managed services. There are many providers which are similar to Hetzner / DigitalOcean, or lie somewhere in between them. Some such providers which I have personally used at some point are OVH, LeaseWeb, Linode, Vultr and ScaleWay. Amazon has been used as a representative of the large, global cloud providers with a complete suite of services. Microsoft Azure and Google Cloud are good alternatives to Amazon.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.