How do you build a high availability, horizontally scaling application

  softwareengineering

I’ve designed an application, but I’ve had problems with scaling. Initially, this application was a simple docker compose file, that ran on a decently powerful VM.

Containerization is great, but the problem I’ve seen is that my different containers running various microservices (five in total), require different amounts of power. Along with my main application, I’m running search, caching, a reverse-proxy, and a database. The first four things work great, but at peak traffic the database completely crashes my VM.

Is there a simple solution to the problem of scaling in an application with multiple microservices? I’m looking for a couple things.

  • Horizantally scaling – the solution should be able to scale up and down the number of servers depending on traffic
  • On the cloud – I don’t want to self-host
  • Able to handle virality – If traffic spikes heavily, I want to be able to handle very high peaks
  • Ability to run microservices – I want all my seperate microservices running and scaling on their own in containers
  • Relatively cheap cost – I only want to pay for servers that I’m fully taking advantage of
  • Automatic – optimally, I would be able to setup my servers once and never have to worry about them again

Some things that would be nice but not required.

  • CI/CD
  • Telemetry
  • Included proxy

I know of Kubernetes, but apart from being expensive, it is complex and I’m not sure how to handle multiple machines.

With managed databases, they’re okay but ridiculously expensive. I also would like to manage the database on my own (both the main database and the search one).

My best option so far has been Google’s Cloud Run (AWS equivalent is Fargate, Azure’s is App Service), but I’ve had problems with persistent storage running my databases.

Basically, I to take my docker compose file, and run all five of its microservices, without needing one big (unereliable) server.

New contributor

rabbibillclinton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT