Skip to main content

Deployment Topology

:::info Source Sourced from services/marketplace-service/DEPLOYMENT_TOPOLOGY.md in the documentation repo. :::

1. Containers

  • marketplace-api — REST API.
  • marketplace-saga — Purchase saga coordinator.
  • marketplace-outbox-relay — NATS publisher.
  • marketplace-admin-worker — listing approval, KYC workflow.

2. Scaling

ContainerMinMaxHPA
api330CPU>60%, spikes on launches
saga320in-flight sagas > 1000
outbox-relay28backlog > 5000

3. Resources

api: 500m/2000m, 512Mi/1.5Gi. saga: 500m/2000m, 512Mi/2Gi.

4. Caching

  • Redis: listing cache (5 min), user cart state (24h), rate limits.
  • CDN: public listing detail pages (5 min; invalidated on edit).

5. Storage

  • Postgres schema marketplace.
  • S3 for listing media (icons, previews).
  • No payment data (lives in billing).

6. Regional

  • Listings + orders in buyer tenant's home region.
  • Cross-tenant purchase: provider cross-region OK; data stays in buyer region.

7. Service Mesh

mTLS. Egress: billing, enrollment, catalog, search, notification, ai-gateway.

8. Release

Blue/green for API. Saga coordinator: drain in-flight sagas before old pod terminates.

9. DR

RPO 5 min, RTO 60 min. Saga state persisted; resumes after failover.

10. Diagram

Buyer ──▶ CDN ──▶ marketplace-api ──▶ Postgres

├──▶ billing (payment intent)


NATS outbox ──▶ marketplace-saga

├─ wait for billing.payment.succeeded
├─ emit marketplace.license.granted
├─ wait for enrollment.created
└─ emit marketplace.order.fulfilled

compensation on failure: refund + revoke license + emit order.failed