Cost-Optimized Multi-Env EKS Web Platform

Shared Amazon EKS hosts dev and prod in separate namespaces. Route 53, ALB/WAF, RDS, Redis, ECR, Secrets Manager, and Gi...

39 views
Viewed 39 times
0

Opens a ready-to-edit copy — free to start

Cost-Optimized Multi-Env EKS Web Platform

Shared Amazon EKS hosts dev and prod in separate namespaces. Route 53, ALB/WAF, RDS, Redis, ECR, Secrets Manager, and GitLab CI/CD support secure app delivery.

Multi-Cloud Architecture

This architecture spans 2 cloud providers

AWS
CROSS_CLOUD

Architecture Description

This architecture uses a single Amazon EKS cluster to host both development and production workloads while keeping them logically separated through Kubernetes namespaces. The cluster contains an app-dev namespace for development deployments and an app-prod namespace for production workloads. This approach reduces fixed infrastructure cost compared to running separate EKS clusters for each environment, while still allowing separate deployments, resource limits, secrets, and access controls for dev and prod. Application traffic enters through Route 53, which manages DNS records for the frontend and backend domains. Public requests are routed to an AWS Application Load Balancer created and managed by the AWS Load Balancer Controller inside the EKS cluster. The ALB handles Layer 7 routing, TLS termination through AWS Certificate Manager, and routes traffic to the correct Kubernetes services based on hostnames such as app.example.com, api.example.com, web.dev.example.com, and api.dev.example.com. AWS WAF is placed in front of the Application Load Balancer to provide common web protection and rate limiting. This removes the need for a self-managed proxy such as HAProxy or an NGINX Ingress Controller. Kubernetes Ingress resources define the routing rules, while the AWS ALB provides the actual public load balancing layer. This keeps the architecture simpler, more AWS-native, and easier to operate. The Next.js web application runs inside Kubernetes as a Dockerized Node.js service using Next.js standalone output. Because the app uses Next.js server-side functionality, it does not require Nginx inside the frontend container. The web service runs as Kubernetes pods behind a ClusterIP service, and public traffic is routed to it through the shared ALB and Kubernetes Ingress. The backend API also runs as a Dockerized Kubernetes deployment. It is exposed internally through a Kubernetes service and externally through its own Ingress hostname. The backend connects privately to Amazon RDS PostgreSQL for persistent relational data and Amazon ElastiCache Redis for caching, sessions, queues, and application-level rate limiting. These data services are deployed in private subnets and are not publicly accessible. To reduce cost, the development environment uses smaller resources than production. Dev can run with one replica of the web app, one replica of the backend, a small Single-AZ PostgreSQL instance, and either a small Redis instance or an in-cluster Redis deployment for non-critical testing. Production uses multiple replicas, stronger resource limits, Multi-AZ PostgreSQL, managed Redis, backups, monitoring, and stricter security controls. GitLab CI/CD is responsible for building and deploying the applications. Each repository builds a Docker image, pushes it to Amazon ECR, and deploys to EKS using kubectl and Kustomize. The develop branch deploys automatically to the dev namespace, while the main branch builds production images and requires a manual approval step before deploying to production. GitLab uses AWS IAM OIDC roles instead of long-lived AWS access keys. Secrets are stored in AWS Secrets Manager and synced into Kubernetes using External Secrets Operator. This allows application pods to consume values such as database URLs, Redis URLs, JWT secrets, and application secrets without storing sensitive data in GitLab or committing secrets into source control. Observability is handled through CloudWatch, ALB metrics, WAF logs, EKS logs, RDS metrics, and Redis metrics. Logs should have short retention in development and longer retention in production. Alerts should monitor unhealthy ALB targets, high 5xx errors, pod restarts, CPU and memory pressure, RDS connection usage, Redis memory usage, and WAF blocking spikes. Overall, this design keeps the system production-capable while controlling cost. It avoids unnecessary infrastructure duplication, shares the EKS cluster and ALB where appropriate, keeps managed databases and Redis private, and uses AWS-native services for routing, TLS, security, secrets, and monitoring.

Community Discussion

Sign in to join the discussion

Sign in to comment

Be the first to comment

Share your thoughts on this architecture

JJ

Jun Jo

@junjo249

View portfolio
Try it in the Playground

Open an interactive version — fork it, generate AI variants, or share it with your team.

What You'll Get

Editable diagram in your workspace
Interactive cost estimates
AI-powered customization
Save and share your version

Start Customizing

Make this template your own

Takes 30 seconds • No credit card required

Share

Statistics

Views
39
Clones
0
Likes
0
Readiness
86/100

Details

Category
architecture

Estimated monthly cost

$382.82/month

Published
7/7/2026

Services Used

25 cloud services in this architecture

RouteTable
SecurityGroup
Route53
ALB
TargetGroup
EKS
LaunchTemplate
AutoScalingGroup
ECR
RDSInstance
ElastiCache
SecretsManager
KMS
CloudWatch
CloudWatchAlarm
CloudTrail
GuardDuty
SecurityHub
S3Bucket
Vpc-platform
InternetGateway
WAF
NATGateway
GitLabRepo
ArgoCD

Use This Template

Opens a personal copy in the designer — customize, remix, and make it yours.

Free to start — no credit card required

Takes 30 seconds • No credit card required

You Might Also Like

Cloud Architecture for Ad Network with Authentication
448

Cloud Architecture for Ad Network with Authentication

Please create a cloud architecture for an ad network. Features that we need include: user authentication on our…

AWS
AZURE
Serverless E-Commerce Platform with Real-Time Inventory
291

Serverless E-Commerce Platform with Real-Time Inventory

Design a serverless e-commerce platform with real-time inventory management. Use AWS Lambda for order processing,…

AWS
Global E-Commerce Platform with Multi-Cloud Failover
234

Global E-Commerce Platform with Multi-Cloud Failover

Create a global e-commerce platform with multi-cloud redundancy. Use AWS in us-east-1 for the primary application with…

AWS
AZURE
GCP
Scalable 3-Tier Web Application
216

Scalable 3-Tier Web Application

Create a basic web application on AWS with EC2 instances behind an Application Load Balancer, using RDS for the…

AWS