Containers on cloud-Running Stable Scalable Kubernetes Cluster on AWS-Cost optimization

By March 30, 2020 April 17th, 2020 Uncategorized

Customer: A large e-commerce startup


Problem Statement

The customer is a large e-commerce start-up with all their applications running on AWS. The customer was running their core micro-services application in Amazon Elastic Beanstalk multi-container environment. The setup had the below problems:

  • The existing environment was unable to scale for individual service
  • Deployment for a service was affecting other services too
  • Cost of running their micro-services was high
  • Memory-based scaling for each micro-service was not implemented

Proposed Solution

Powerup’s DevOps team helped the customer in implementing the Kubernetes cluster from scratch to overcome the issues in the existing cluster.

Key Points on the Architecture

  • Separate subnet is being created for Kubernetes Master nodes and cluster nodes, ELB, Cache/Search,

Databases in each availability zone

  • Kong is used as API Gateway for the microservices
  • Kong servers are implemented in Cluster with Cassandra as backend for Kong API
  • All microservices are created in Kubernetes with HPA for the pod level scaling and all microservices are stateless
  • ElastiCache Redis is being used to store the sessions and few services uses Hazelcast as in-memory cache
  • Hazelcast cluster gets automatically created based on the Kubernetes service name
  • ElasticSearch cluster is used for Search and its configured in HA mode
  • MongoDB and MySQL are used as Database engines
  • Highly Scalable — Kubernetes node is configured in the auto-scaling group. So the application will horizontally scale-up based on the server CPU utilization.

To read more on the CI/CD setup and Configuration Management for this setup, please scan and read the blog post here.


AWS billing was brought down to 38k from 230k.

Cloud platform


Technologies used

MySql, Redis, ELB, ElasticSearch Cluster.

Leave a Reply