Skip to content

Elastically Scaling Athena APIs

Arun Patra edited this page Aug 7, 2020 · 5 revisions

Scaling Athena APIs

Consider, the APIs are implemented as microservices; which would probably be a logical approach to start with. Some of the requirements around those APIs are:

  1. Scalability: Number of concurrent users per second.
  2. Availability: The services must comply with agreed SLAs. 99.9 % availability seems to be reasonable.
  3. Cost: Ensuring the least possible cost of running the APIs is a key concern.

To address these needs, one might consider a few approaches:

Fully Managed Auto scaling

A solution like Elastic Beanstalk from Amazon may be considered. The number of nodes may thus scale elastically while guaranteeing a minimum number of nodes are load balanced. It's a compact stack that has a pretty low barrier to entry. It is desirable where one has a relatively low number of microservices.

Kubernetes based container orchestration and Service Mesh technologies

In this case, the application(microservices) need to be packaged as docker containers. Such containers would then be deployed to a kubernetes cluster and automation may be used to scale the number of replicas of each microservice. A Service mesh thrown into the mix can successfully handle concerns like internal load balancing, TLS offloading and retry. Very sophisticated distributed tracing can be done via the service mesh as well. The cost of a fully managed Kubernetes cluster like Amazon EKS is non-trivial. The cost is in lieu of the complexity involved in managing the cluster.