beaus-tolling

AWS Cloud Architecture

Executive Summary

The AWS design for Beaus should optimize for the lowest practical operating cost at low and medium scale, while preserving a clean scale-up path for very high event throughput and strict service-level expectations.

That means two things are true at once:

Reality Check on Scale

A sustained target of 1 million trips per second is a hyperscale ingestion problem. It is not realistic to describe that as the absolute lowest-cost operating posture.

The practical design goal is:

This is the only credible way to align cost discipline, maintainability, and extreme-scale readiness.

flowchart TB
  USERS["Agents, supervisors, admins, customers"] --> CF["CloudFront"]
  CF --> WAF["AWS WAF + Shield Standard"]
  WAF --> S3UI["S3 static front-end hosting"]
  WAF --> ALB["Application Load Balancer"]

  ALB --> EKS["Amazon EKS on Graviton nodes"]
  EKS --> REDIS["ElastiCache for Redis"]
  EKS --> RDS["Amazon RDS for PostgreSQL"]
  EKS --> S3DATA["Amazon S3 for evidence, exports, archives"]
  EKS --> MSK["Amazon MSK"]

  ROAD["Roadside event producers"] --> NLB["Network Load Balancer / ingest gateway"]
  NLB --> INGEST["Dedicated ingest services"]
  INGEST --> MSK

  MSK --> STREAM["Kafka consumers / stream processors"]
  STREAM --> RDS
  STREAM --> S3DATA
  STREAM --> REPORT["Report projections"]

  GH["GitHub Actions"] --> OIDC["AWS OIDC federation"]
  OIDC --> ECR["Amazon ECR"]
  OIDC --> EKS

Core AWS Services

Edge and delivery

Application runtime

Data

Event backbone

Security and operations

Cost-Optimized Design Principles

1. Keep front ends serverless

Angular applications should be delivered from S3 and CloudFront, not from long-running web servers.

2. Separate hot ingest from transactional services

Do not push peak trip ingest directly into PostgreSQL-backed microservices. Kafka absorbs the spike; downstream services consume and materialize only what they own.

3. Use managed services where they reduce operational drag

Managed services cost more than pure DIY in some scenarios, but they are often cheaper overall once availability, patching, staffing, and incident cost are counted.

4. Use Graviton and elastic node provisioning

Graviton instances and Karpenter-based scaling are the preferred baseline for reducing compute cost without giving up performance.

5. Minimize NAT spend

Use VPC endpoints where possible and avoid unnecessary always-on NAT footprint in non-production environments.

Performance Strategy

Agent and customer UX

Design target:

Trip ingestion

Design target:

Availability and Release

Security and PII

Non-production

Production initial launch

Scale-up path