Notes

Part 5 of 10

Cloud versus self-hosting

For any task a company can ask: do we do this ourselves, or pay someone else? A common rule: keep in-house what is core to your business and gives you an edge, and hand routine, non-core work to a vendor. As an extreme case, almost no company makes its own CPUs; they buy them.

For software there are really two separate choices: who builds it, and who runs it.

OptionWho buildsWho runs
Custom softwareYouYou
Off-the-shelf software you host, like PostgreSQLSomeone else (open source or a seller)You
Cloud service or SaaSA vendorThe vendor; you use it through a web page or API

Self-hosting can mean on premises, on your own hardware (even if it sits in a rented rack in someone else's building), or on a VM you rent from a cloud provider, which is called IaaS (infrastructure as a service).

Pros and cons of cloud services

With a cloud service, you hand the running of the software to the provider. Providers say this saves time and money and lets you move faster. The truth depends on your situation.

  • Cost depends on your skills and your load. If your team already knows how to run the system and load is predictable, owning machines is often cheaper.
  • If you do not know how to run the system, a service is quicker than learning, and hiring and training ops staff is expensive. You still need an ops team, but it can work on higher-level problems.
  • A specialist provider may run the system better than you, since it has learned from many customers. But running it yourself lets you tune it for your exact workload, which a provider will not do for you.
  • Cloud is strongest when load swings a lot. Buying machines for the peak leaves them idle most of the time; cloud lets you grow and shrink with demand.
  • Analytics load is very bursty. A fast answer to a big query needs many machines working in parallel for a short time, then they sit idle. Scheduled reports can wait in a queue to smooth the load, but the faster you want interactive answers, the burstier the load gets. For large datasets, handing idle machines back saves real money; for small datasets it matters less.

The biggest downside is that you lose control:

  • A missing feature? You can only ask the vendor.
  • An outage? You can only wait.
  • A slowdown or bug? You cannot see the OS metrics, debug data, or server logs, so it is hard to find the cause.
  • If the service shuts down, gets too expensive, or changes in a way you dislike, you must move, and you usually cannot keep running the old version.
  • Few standard APIs means moving is costly: vendor lock-in. Services with compatible APIs lower this risk.
  • A political fight with the provider's home country can cut you off through sanctions.
  • You must trust the provider to keep your data safe, which makes privacy and security compliance harder.

Even so, cloud use, and hybrid setups that use cloud for some parts, keep growing. In-house systems remain for older software written before cloud, and for special needs the cloud cannot meet, like trading systems that need full control of the hardware for speed.