HACKER Q&A
📣 Maarius

How to host simple Rails API to get 99.99% uptime


I am looking to host a relatively simple Rails API. From a technical side the complexity is quite low but availability is crucial and should hopefully be 99.99% or better.

To keep the DevOps overhead low I am thinking about using DigitalOcean.

The current idea is

* Use the "App Platform" with multiple app instances that are load balanced through DO itself (unfortunately only within same region)

* Use managed Postres with multiple standby nodes (allows for "immediate automatic failover")

* Optionally replicate the app servers in a different region and use an external load balancer to fail over between regions (not possible within the App Platform itself)

Do you have any other / better ideas for a rather straightforward setup? I am trying to avoid AWS but am not completely opposed.


  👤 dorongrinstein Accepted Answer ✓
Actually, https://controlplane.com provides 99.999% availability SLA. The reason it is able to do so is because it distributes your containerized workloads across multiple regions on multiple clouds (you pick the regions and clouds). You can have a single region or 200 regions - with the same effort. It then charges you by the millicore (1,000th of a vCPU core) for exactly what your app uses. It gives you metrics, logging, tracing, alerting, secrets management, service discovery, auto-TLS and you can trivially use your own domain name. You get the power of the hyper-scalers with the ease of use of Heroku. The best part is that it lets you mix-n-match ALL/ANY service from any cloud in your code without you having to deal with credentials! Meaning you can use S3, DynamoDB, RDS, Big Query, Big Table, Cosmos DB, etc. - across AWS, GCP and Azure and you can even run your code on-premises or on ANY providers such as Linode, Hetzner, Contabo, Equinix, Oracle, etc. In short - it is the "non-toy" way to run your code when failure is not an option, but at a ridiculously low cost.

👤 andrewfromx
I love my own little "devops" toolkit to get this on google cloud and all for free if you stay in their free tier:

https://many.pw/hosting

You get a 30GB hard drive, 1GB ram, and two AMD EPYC 7B12 2250 MHz processors. That's enough to run a nice little site with plently of traffic.

To keep uptime during deploys it runs a reverse proxy to port 3000 and 3001 and switch between them each deploy.


👤 lantry
Most cloud services have SLAs of 99.99 themselves, so it's not entirely realistic to go higher than that.

The good news is that you probably don't need 99.99. Read "Embracing Risk": https://sre.google/sre-book/embracing-risk/


👤 dorongrinstein
Use https://controlplane.com - you'll get multiple regions and ultra low cost and fun user experience.