Infrastructure Design
Overview of the Lumieos platform architecture, deployment model, and how the environment is designed for high availability and cost efficiency.
Design Philosophy
Lumieos runs on Google Cloud Platform (GCP) using fully managed, serverless services. The architecture is designed to:
- Eliminate single points of failure through managed services with built-in redundancy
- Support multi-region deployments with data residency compliance where required
- Automate deployments through GitLab CI/CD pipelines
Core Services
| Service | Purpose |
|---|---|
| Cloud Run | Serverless compute for Lumieos — deployed as a multi-container service |
| Cloud SQL | Managed PostgreSQL and MySQL database instances with automated backups and point-in-time recovery |
| Cloud Tasks | Background job processing, with built-in retries and serial execution support |
| Cloud Scheduler | Periodic task scheduling |
| Cloud Storage (GCS) | Regional file upload buckets for regions with data residency requirements |
| Cloudflare R2 | Storage for North American regions |
| Pub/Sub | Real-time event broadcasting for chat and messaging via Server-Sent Events (SSE) |
| Artifact Registry | Docker image storage for deployment artifacts |
Cloudflare
Cloudflare remains central to the architecture as the edge proxy and routing layer:
- Domain routing — A Cloudflare Worker maps each partner’s custom domain (via Host header) to the correct Cloud Run backend region using Cloudflare KV.
- Static assets — Served directly from Cloudflare’s edge network, eliminating high-bandwidth traffic from the origin servers.
- R2 storage — North American instances use Cloudflare R2 for file uploads, providing S3-compatible storage with zero egress costs.
- Security — Origin servers are not directly exposed to the public internet. All traffic flows through Cloudflare.
Multi-Container Deployment
Each Cloud Run service deploys three containers as a single unit:
| Container | Role |
|---|---|
| Backend Ingress container — handles API requests and proxies to sidecars | |
| Frontend Sidecar — renders the user-facing application | |
| MJML | Sidecar — renders email templates |
The backend proxies requests to the frontend and MJML containers via localhost networking. All containers share the same lifecycle and scale together.
Multi-Region Architecture
Lumieos supports multiple deployment regions to meet data residency and latency requirements.
| Region | Location | Database | File Storage |
|---|---|---|---|
| North America | us-central1 | Cloud SQL | Cloudflare R2 |
| South Africa | africa-south1 | Cloud SQL | Google Cloud Storage |
Each region has its own:
- Cloud Run service
- Cloud SQL instance
- Cloud Tasks queues (3 per region:
default,event,background) - Cloud Scheduler jobs
- Upload storage bucket
Last updated on