susheel.dev
Technical Architect

Autonomous Cloud: Operating 9 Production Platforms on Bare-Metal Infrastructure

High-density bare-metal production platform running nine applications, shared microservices, central single sign-on, and automated telemetry in Docker behind Nginx and Cloudflare.
Fleet Platform Infrastructure3 min readDevOps

The Challenge

Engineering modern web applications across separate cloud PaaS providers (e.g. Vercel, AWS ECS, Heroku, Datadog) introduces significant compounding disadvantages for small-to-medium teams:

  1. Rising Infrastructure Costs: Running 9 production web applications, databases, Redis caches and monitoring across separate managed platforms adds up quickly.
  2. Fragmented Authentication: Managing user accounts and administrative roles separately across 9 apps creates credential fatigue and operational security risks.
  3. Black-Box Vendor Lock-In: Limited visibility into underlying OS kernel parameters, network latency, connection pooling, and disk I/O.
  4. Maintenance Overhead: Fragmented logging, divergent deployment pipelines, and fragile cross-service networking.

Architectural Solution

I engineered a production-hardened, self-hosted micro-cloud operating on dedicated bare-metal infrastructure:

1. Unified Container Mesh via Docker Compose

All 9 production services run in isolated Docker containers linked through private bridge networks:

Production ServiceDomainArchitecture & Technology
Susheel.devsusheel.devFreelance Agency & Technical Portfolio (Next.js 16 SSG/SSR)
GullyCartgullycart.inHyper-local grocery quick-commerce with COD and PIN geofencing
Millets Mandirmilletsmandir.comRestaurant franchise marketing and lead qualification pipeline
Platform SSOsso.susheel.devCentral Identity Provider with multi-domain ticket exchange
Shared API Gatewayapi.susheel.devNode.js / Express REST gateway & webhook processor
Internal Fleet MonitorInternal GatewayReal-time system telemetry, container metrics, and uptime
Executive Dashboarddashboard.susheel.devAdministrative hub and operations overview console
Utility Enginebills.susheel.devAutomated electricity consumption and tariff calculation engine
Connected EV Telemetrymgapi.susheel.devReal-time IoT telematics proxy for MG electric vehicles

Each Next.js application compiles with output: 'standalone', which keeps the Docker images small. MongoDB and Redis listen exclusively on localhost and Docker internal subnets, shielded from all public ingress.

2. Dual-Layer Edge Security: Cloudflare + Nginx Reverse Proxy

  • Cloudflare Full (Strict) SSL: Cloudflare Origin CA certificates enforce strict bidirectional TLS verification between Cloudflare edge servers and the host origin. Direct origin IP access is blocked at the firewall.
  • Granular Edge Caching: Tailored Cloudflare and Nginx cache rules ensure that public marketing pages and hashed static bundles receive edge caching with 30-day TTL, while APIs, checkout endpoints, and admin dashboards are marked no-store.
  • Hardened Security Headers: Automated injection of Content-Security-Policy, X-Frame-Options, Strict-Transport-Security, and Permissions-Policy.

3. Centralized Single Sign-On (SSO) & Ephemeral Ticket Exchange

Engineered a centralized Identity and Access Management (IAM) service:

  • Same-Domain Wildcard Cookies: Applications on *.susheel.dev share encrypted HttpOnly, Secure, SameSite=Lax cookies scoped to .susheel.dev.
  • Cross-Domain Single-Use Tickets: For apex domains like gullycart.in where third-party cookies are blocked by modern browsers, authentication uses a short-lived, single-use signed ticket handshake with api.susheel.dev.
  • Central Single Logout (SLO): Immediate revocation across all domain scopes simultaneously upon logout.

4. Automated Operations, Backups & Telemetry

  • Rate Limiting: Redis-backed rate limits defend authentication, contact forms, and order endpoints.
  • Nightly Backups: A scheduled GitHub Actions job copies the MongoDB data and uploaded images off the server every night.
  • Monitoring: A monitoring dashboard shows CPU, memory and container health, and an uptime check pings every public site every 15 minutes.

What was delivered

  • One server, many apps: 9 production apps and services, each in its own container.
  • One sign-in everywhere: a shared SSO across all apps, including the separate gullycart.in domain.
  • Private data stores: MongoDB and Redis are reachable only inside the server's private network.
  • Repeatable deploys: builds are checked on every push, and production deploys run from GitHub.
  • Backups and checks: nightly off-server backups and uptime checks every 15 minutes.
Direct Collaboration

Let's build your next system right.

A short call is often enough to check feasibility, compare architecture options, and agree on a realistic delivery plan. Direct 1-on-1 collaboration with zero agency overhead.

I reply within 24 hours•Fixed-scope or monthly fractional advisory
Book a callWhatsApp