Infrastructure
This document provides technical details about the 23blocks platform infrastructure, including our edge architecture, URL patterns, and environment routing.
Edge Architecture
Every API request to 23blocks flows through our global edge network:
Your App → CloudFront (400+ edge locations) → Lambda@Edge → Service API
Request Flow
- Edge Location - Request hits the nearest CloudFront edge location (typically < 50ms from any user)
- Lambda@Edge - Validates API key and determines routing
- Origin Shield - Regional caching layer reduces origin requests
- Application Load Balancer - SSL termination and health checking
- Service Container - Your request reaches the service API
Per-Service URL Pattern
Each 23blocks service has its own dedicated URL following this pattern:
https://{service}.api.us.23blocks.com
Complete Service URL List
| Service | URL | Description |
|---|---|---|
| Auth | https://auth.api.us.23blocks.com | Authentication, users, MFA, SSO |
| Content | https://content.api.us.23blocks.com | Headless CMS |
| Files | https://files.api.us.23blocks.com | Cloud storage & CDN |
| Forms | https://forms.api.us.23blocks.com | Dynamic forms |
| CRM | https://crm.api.us.23blocks.com | Customer relationships |
| Wallet | https://wallet.api.us.23blocks.com | Digital wallets & payments |
| Assets | https://assets.api.us.23blocks.com | Digital asset management |
| Onboarding | https://onboarding.api.us.23blocks.com | User activation flows |
| Companies | https://company.api.us.23blocks.com | Teams & organizations |
| Products | https://products.api.us.23blocks.com | Product catalog |
| Sales | https://sales.api.us.23blocks.com | Subscriptions & payments |
| Rewards | https://rewards.api.us.23blocks.com | Loyalty & gamification |
| Search | https://search.api.us.23blocks.com | Full-text search |
| University | https://university.api.us.23blocks.com | Learning management |
| AI/Jarvis | https://jarvis.api.us.23blocks.com | Machine learning features |
| Geolocation | https://geolocation.api.us.23blocks.com | Maps & locations |
| Real Time | https://conversations.api.us.23blocks.com | WebSocket & WebRTC |
Environment Routing
API Key-Based Routing
Use the same URL for all environments. Your API key prefix determines routing:
| API Key Prefix | Environment | Use Case |
|---|---|---|
pk_test_* | Staging | Public key for client-side staging |
sk_test_* | Staging | Secret key for server-side staging |
pk_live_* | Production | Public key for client-side production |
sk_live_* | Production | Secret key for server-side production |
How It Works
The Lambda@Edge function reads your API key and routes to the appropriate backend:
API Key: pk_test_abc123
↓
Prefix: pk_test_
↓
Route to: Staging environment
Configuration Example
import { create23BlocksClient } from '@23blocks/sdk';
// Development/Staging
const stagingClient = create23BlocksClient({
urls: { authentication: 'https://auth.api.us.23blocks.com' },
apiKey: process.env.BLOCKS_TEST_API_KEY, // pk_test_* or sk_test_*
});
// Production
const productionClient = create23BlocksClient({
urls: { authentication: 'https://auth.api.us.23blocks.com' },
apiKey: process.env.BLOCKS_LIVE_API_KEY, // pk_live_* or sk_live_*
});
Benefits
- Same URL everywhere - No environment-specific URLs to configure
- Safer deployments - Swap API keys, not infrastructure
- Consistent testing - Same code paths, same URLs
- Simple CI/CD - Environment is a configuration value
Health Check Endpoints
Each service exposes a health check endpoint for monitoring:
GET https://{service}.api.us.23blocks.com/health
Response Format
{
"status": "healthy",
"service": "auth",
"version": "2.4.1",
"timestamp": "2026-01-20T10:30:00Z",
"checks": {
"database": "healthy",
"cache": "healthy",
"dependencies": "healthy"
}
}
Status Values
| Status | Description |
|---|---|
healthy | All systems operational |
degraded | Partial functionality, some features may be slow |
unhealthy | Service is down or unresponsive |
Using Health Checks
# Check Auth service health
curl https://auth.api.us.23blocks.com/health
# Check multiple services
for service in auth content files forms; do
curl -s "https://${service}.api.us.23blocks.com/health" | jq '.status'
done
AWS Infrastructure
Compute Layer
- ECS Fargate - Serverless container orchestration
- Auto Scaling - Automatic capacity based on demand
- Multi-AZ - Containers distributed across availability zones
Database Layer
- RDS Aurora PostgreSQL - Multi-AZ database clusters
- Read Replicas - Distributed read capacity
- Automated Backups - Daily snapshots with 35-day retention
Caching Layer
- ElastiCache Redis - In-memory caching
- Multi-AZ Replication - High availability cache cluster
Storage Layer
- S3 - Object storage with 99.999999999% durability
- CloudFront - Global CDN for file delivery
- S3 Transfer Acceleration - Fast uploads worldwide
Network Layer
- CloudFront - 400+ edge locations
- Lambda@Edge - Intelligent routing at the edge
- Application Load Balancer - SSL termination, health checks
- WAF - Web application firewall protection
Security
Encryption
- In Transit - TLS 1.3 for all connections
- At Rest - AES-256 encryption for databases and storage
- Key Management - AWS KMS for key rotation
Network Security
- VPC Isolation - Private subnets for services
- Security Groups - Strict inbound/outbound rules
- WAF Rules - Protection against common attacks
DDoS Protection
- AWS Shield Standard - Always-on DDoS protection
- CloudFront - Edge-level DDoS mitigation
- Rate Limiting - Per-API key request limits
Monitoring
Metrics
- Prometheus - Time-series metrics collection
- Custom Metrics - Request latency, error rates, throughput
Visualization
- Grafana - Real-time dashboards
- Per-Service Dashboards - Service-specific metrics
- Executive Dashboard - Platform-wide health overview
Logging
- Loki - Centralized log aggregation
- Structured Logs - JSON format for easy querying
- Log Retention - 90 days for debugging
Alerting
- Alert Rules - Threshold-based alerts
- PagerDuty Integration - On-call engineer notification
- < 30 Second Alert Time - Fast incident response
SLA & Uptime
| Tier | Uptime SLA | Response Time |
|---|---|---|
| Shared Cloud | 99.5% | 24-48 hours |
| Dedicated Cloud | 99.9% | 4 hours |
| Enterprise | 99.99% | 1 hour |
Incident Communication
- Status Page - https://status.23blocks.com
- Email Notifications - Subscribed customers notified
- Slack Updates - Real-time incident updates
Regional Availability
Currently available in:
| Region | Location | Status |
|---|---|---|
us | US East (N. Virginia) | Active |
Coming Soon
eu- Europe (Frankfurt)ap- Asia Pacific (Singapore)
Related Resources
- Deployment Options - Choose your deployment mode
- Block Documentation - API reference for each block
- Security Overview - Security certifications and practices