rl-docs-hub

Home · Apps · rl-main-infra


Shared Ingress and Edge Patterns

rl-main-infra should model ingress as shared platform patterns first, then compose those patterns into workload modules.

This avoids a repo full of one-off files like pbx-alb.ts or pbx-cloudfront.ts when the underlying AWS pattern is reusable.

Pattern ownership rule

Standard pattern catalog

1) CloudFront + S3

Recommended module home: src/platform/ingress/cloudfront-s3-site.ts

Use for:

Responsibilities:

2) ALB + ECS

Recommended module home: src/platform/ingress/alb-ecs-service.ts

Use for:

Responsibilities:

Likely workload consumer:

3) ALB + EC2

Recommended module home: src/platform/ingress/alb-ec2-service.ts

Use for:

Responsibilities:

Likely workload consumer:

4) NLB + EC2

Recommended module home: src/platform/ingress/nlb-ec2-service.ts

Use for:

Responsibilities:

Likely workload consumer:

PBX reference architecture

PBX is the first workload where the split between web ingress and voice ingress must be explicit.

Web/admin plane

CloudFront -> ALB -> PBX EC2

Why:

Voice/trunk plane

NLB -> PBX EC2

Why:

Pattern composition rule for PBX

PBX should be represented as a workload folder, not as a stack of flat special-case modules.

Recommended shape:

src/workloads/pbx/
├── index.ts
├── host.ts
├── web-ingress.ts
├── voice-ingress.ts
├── dns.ts
└── types.ts

Where:

What not to do

Avoid these anti-patterns:

Decision guardrails

When adding a new ingress-related file, ask:

  1. Can another workload use this without PBX naming in its interface?
    • if yes, it belongs under src/platform/ingress/
  2. Does this file describe PBX business/workload composition?
    • if yes, it belongs under src/workloads/pbx/
  3. Is this just for a migration/cutover window?
    • if yes, it belongs under src/migrations/

Naming rule reminder

For ingress docs and all new workload-facing modules: