๐Ÿ—๏ธ INFRASTRUCTURE OVERVIEW

Built for Zero Downtime

Multi-cloud redundancy, edge-cached delivery, and automatic failover โ€” because professionals making billion-dollar site selection decisions can't afford a loading spinner.

300+
CDN Edge Nodes
2
Independent API Backends
<10s
Failover Detection
99.9%
Uptime Target
30 Days
Backup Retention

Architecture Overview

Four-layer defense against single points of failure

Layer 1 โ€” Edge
Cloudflare Pages + Workers CDN
All frontend assets are served from Cloudflare's global CDN with 300+ points of presence. A Cloudflare Worker sits at the edge and intercepts every /api/* request, routing it to the active backend. Static pages, the interactive map, Land & Power tool, and all UI components load instantly from cache โ€” no backend dependency for initial render. The Worker also serves AI agent discovery files (llms.txt, openapi.json) directly from edge, so AI platforms like ChatGPT, Claude, and Gemini can discover and integrate DC Hub without hitting the origin.
Layer 2 โ€” API Compute
Railway ACTIVE
The Python/Flask REST + MCP server runs on Railway with a 10-second health timeout at the CF Worker edge. The worker buffers POST request bodies so form submissions and authentication survive transient retries. X-DC-Worker-Version headers identify the build that served each request for monitoring. Auto-redeploy fires on every push to main in azmartone67/dchub-backend. When Railway is unreachable the CF Worker serves a 24h stale-cache fallback from KV so the site degrades gracefully instead of going dark.
Layer 3 โ€” Data Persistence
Neon PostgreSQL + Cloudflare R2 MANAGED HA NIGHTLY BACKUP
All platform data โ€” 20,000+ facility records, M&A transactions, capacity pipeline, news articles, user accounts, API keys, and alert configurations โ€” is stored in Neon's serverless PostgreSQL. Neon provides provider-managed high availability with automatic failover, point-in-time recovery, and connection pooling. An automated nightly backup pipeline dumps the full database to Cloudflare R2 object storage with gzip compression and 30-day retention, providing an independent disaster recovery layer completely separate from the database provider. Railway connects via a managed connection pool (max 20). Write operations (discovery auto-approval, news sync, AI citation tracking) use idempotency keys on every INSERT so retries from the CF edge cannot create duplicates. The edge KV layer holds JSON responses up to 24h stale-while-revalidate so the public site survives transient Railway outages without showing 5xx pages.
Layer 4 โ€” Frontend Resilience
Client-Side Fallbacks GRACEFUL DEGRADATION
Every data category on the platform โ€” facilities, market intel, transactions, pipeline, news, announcements, chart data, and comparison metrics โ€” has hardcoded fallback data embedded in the frontend. If every backend is down simultaneously, the map still loads with 12,000+ generated facility pins across 70+ global markets, the news feed shows cached articles, and the transaction table displays recent deals. Users never see a blank page. The map uses progressive loading: 2,000 facilities render instantly, with remaining records loading in background batches. A 30-second API timeout prevents hung connections.

Request Flow

How a single API request travels through the stack

๐ŸŒ
User Browser
Any device, anywhere
โ†’
โšก
Cloudflare Edge
300+ global PoPs
โ†’
๐Ÿš‚
Railway API
PRIMARY ยท 10s timeout
If Railway fails or times out โ†“
โ†’
๐Ÿ”„
CF KV Stale Cache
FALLBACK ยท 24h stale-while-revalidate
Backend connects to โ†“
๐Ÿ—„๏ธ
Neon PostgreSQL
MANAGED HA ยท auto-failover
โ˜๏ธ
Cloudflare R2
NIGHTLY BACKUP ยท 30-day retention

Frequently Asked Questions

Technical architecture for investors and enterprise customers

What happens if the primary backend goes down?
The Cloudflare Worker at the edge detects failure within 10 seconds and automatically retries the request on the failover backend. This happens transparently within the same user request โ€” the end user sees a slightly slower response, not an error. POST requests (form submissions, authentication) are buffered so they survive the retry. Both backends serve identical data from the same database.
What happens if both backends are down simultaneously?
The frontend is served from Cloudflare's CDN and loads independently of the backend. Every data category has embedded fallback data โ€” the map renders 12,000+ facility markers from hardcoded market data, the news feed shows cached articles, and transaction/pipeline views display recent records. Users can still browse, search, filter, and export. API-dependent features like live discovery, alerts, and authentication will show graceful error states until a backend recovers.
How does DC Hub prevent data loss?
All data is stored in Neon PostgreSQL, which provides point-in-time recovery, automated backups, and provider-managed high availability. An independent nightly backup pipeline dumps the full database to Cloudflare R2 object storage with gzip compression and 30-day automatic retention โ€” providing disaster recovery even in the unlikely event of a database provider failure. Write operations (facility discovery, news ingestion, auto-approval) are gated to execute on a single backend via environment flags, preventing duplicate writes or race conditions. The database supports instant branching for safe migrations and testing.
What is the uptime target?
DC Hub targets 99.9% uptime for the platform overall. The frontend (Cloudflare Pages) operates at 99.99%+ availability through edge caching. The API layer achieves high availability through multi-provider failover โ€” both compute providers would need to fail simultaneously for API unavailability, and even then the frontend continues to function with cached data.
How does the multi-cloud strategy reduce risk?
DC Hub's infrastructure spans three independent cloud providers: Cloudflare (edge/CDN + R2 backup storage + KV stale cache), Railway (compute), and Neon (managed serverless PostgreSQL). The CF Worker layer holds JSON responses in KV for up to 24h stale-while-revalidate, so a Railway outage shows visitors a possibly-stale-but-served page instead of a hard 5xx. Nightly database backups to Cloudflare R2 give data-layer disaster recovery independent of Neon. A Railway outage is felt as "data 10 min behind" rather than "site down." The autonomous brain runs frontend-endpoint health probes (Phase OOO detector) and surfaces degradations into the autopilot work queue.
How does the map handle 21,000+ facilities without performance issues?
The map uses progressive loading: 2,000 facilities render on first paint, with remaining records loading in 5,000-record background batches at 500ms intervals. A marker sampling algorithm caps visible map pins at 2,000 for smooth interaction while keeping all records available for search, filter, and CSV export. The initial page load requires zero API calls โ€” Leaflet map tiles load from CDN and fallback facility data is embedded in the HTML.
How do AI agents access DC Hub data?
DC Hub supports 12+ AI platforms through multiple integration points: a public REST API with OpenAPI specification, MCP (Model Context Protocol) server for Claude and compatible agents, and discovery files (llms.txt, ai-plugin.json, openapi.json) served directly from the Cloudflare edge. Agent discovery files are served inline from the Worker โ€” they never hit the backend, ensuring AI platforms can always discover and connect to DC Hub even during backend maintenance.
What monitoring and observability is in place?
Every proxied request includes an X-DC-Worker-Version header identifying the CF Worker build that served it. Cloudflare Analytics provides real-time traffic metrics, error rates, and edge performance data. Plausible tracks user engagement (cookie-free, GDPR-friendly). Backend application logs stream from Railway. The autonomous brain (15+ autonomous autopilot patterns) runs a 60+ detector sweep every cron tick and writes findings into queryable worklists (tier_drift_proposals, cron_collision_proposals, package_install_stats).
Is customer data secure?
All traffic is encrypted via TLS/SSL end-to-end. Authentication supports Google OAuth 2.0 and email/password with JWT tokens. API keys are scoped per user with configurable rate limits (Free: 100/day, Pro: 10,000/day, Enterprise: 100,000/day). The Cloudflare Worker enforces CORS policy restricting API access to dchub.cloud origins. Neon PostgreSQL provides encryption at rest and in transit.
What is the technology stack?
Frontend: Vanilla HTML/CSS/JavaScript, Leaflet.js (maps), Chart.js (visualizations), Stripe.js (payments), served via Cloudflare Pages. Backend: Python/Flask REST + MCP server, deployed on Railway. Database: Neon serverless PostgreSQL with nightly backups to Cloudflare R2. Edge: Cloudflare Workers (proxy, CORS, agent discovery, 24h KV stale cache). Integrations: Resend (email), Stripe (payments), Google OAuth, LinkedIn + X + Bluesky (auto-distribution), Anthropic + Perplexity (AI citation tracking), 40+ news sources, EIA/HIFLD/NASA government APIs. Client packages: dchub-mcp-helper on PyPI + @dchub/mcp-helper on npm โ€” drop-in fetch middleware for AI agents.

Ready to access real-time data center intelligence?

Join the professionals who trust DC Hub for mission-critical infrastructure decisions.

โšก Explore the Platform