How nhutkhanh24520782/eks-event-driven-autoscaling works
This repository implements an EKS-hosted asynchronous job system and its autoscaling/chaos demonstration: clients submit jobs through the API, SQS buffers them, and worker pods process them while KEDA can scale from queue depth. Terraform and Kubernetes manifests provide the deployment foundation; the frontend, observability stack, and experiment tools support operation and evaluation. The README explicitly notes that some latency instrumentation and queue-depth monitoring pieces are incomplete. Links reflect documented behavior and the sampled API/worker code; unsampled subsystem internals are not inferred.
Main entry points: src/main.js Job worker · src/main.js Job API · dev AWS infrastructure · frontend Chaos dashboard
Components 19
Job application
- Chaos dashboard
apps/frontend - Job API
apps/backend/api-service/src/main.js - Job worker
apps/backend/worker-service/src/main.js - SQS jobs and DLQ
EKS platform
- AWS ALB
- AWS infrastructure
infra/envs/dev - Kubernetes workloads
k8s/base - KEDA scaling
k8s/autoscaling/keda-scaledobject.yaml - CPU HPA option
k8s/autoscaling/hpa-baseline.yaml
Telemetry
- Prometheus
observability/prometheus - Grafana dashboards
observability/grafana - Promtail log collection
observability/loki - Loki logs
observability/loki
Experiments
- Load generator
scripts/load-test/k6-workload.js - Latency analyzer
scripts/metrics/analyze-control-loop-latency.py - Experiment evidence
docs/evidence
Other components
- Client
- AWS services
- Kubernetes cluster
Connections 21
- Client → AWS ALB: sends requests
README.md - AWS ALB → Chaos dashboard: serves root
README.md - AWS ALB → Job API: routes API
README.md - Chaos dashboard → Job API: triggers scenarios
README.md - Job API → SQS jobs and DLQ: publishes jobs
apps/backend/api-service/src/main.js - Job worker → SQS jobs and DLQ: polls and deletes
apps/backend/worker-service/src/main.js - SQS jobs and DLQ → Job worker: delivers jobs
README.md - SQS jobs and DLQ → SQS jobs and DLQ: routes failed jobs
README.md - AWS infrastructure → AWS services: provisions services
README.md - AWS infrastructure → Kubernetes cluster: provisions EKS
README.md - Kubernetes workloads → Kubernetes cluster: deploys workloads
README.md - KEDA scaling → Job worker: scales from backlog
README.md - CPU HPA option → Job worker: scales by CPU
README.md - Job worker → Prometheus: exposes metrics
README.md - Prometheus → Grafana dashboards: supplies metrics
README.md - Kubernetes cluster → Promtail log collection: provides logs
README.md - Promtail log collection → Loki logs: ships logs
README.md - Loki logs → Grafana dashboards: supplies logs
README.md - Client → Load generator: runs workload
README.md - Load generator → Job API: submits jobs
scripts/load-test/k6-workload.js - Latency analyzer → Experiment evidence: reads captured data
scripts/metrics/analyze-control-loop-latency.py