Platform Architecture
Understanding ShellHub's distributed architecture helps you build more efficient and resilient AI agent systems.
// Architecture Overview
ShellHub is built on a distributed, cloud-native architecture designed for high availability, scalability, and security. The platform consists of several interconnected layers that work together to provide a seamless experience for deploying and managing AI agents.
// Core Components
▸API Gateway
The API Gateway is the entry point for all requests to the ShellHub platform. It handles:
- 01.Request Routing - Directs incoming requests to the appropriate microservice based on URL path and headers.
- 02.Authentication - Validates API keys and JWT tokens before allowing access to protected resources.
- 03.Rate Limiting - Enforces per-user and per-endpoint rate limits to prevent abuse.
- 04.SSL/TLS Termination - Handles HTTPS encryption and certificate management.
▸Orchestration Layer
Built on Kubernetes, the orchestration layer manages the lifecycle of your agents:
- 01.Container Scheduling - Automatically places agent containers on optimal nodes based on resource requirements.
- 02.Auto-scaling - Dynamically adjusts the number of agent instances based on CPU, memory, and custom metrics.
- 03.Health Monitoring - Continuously checks agent health and automatically restarts failed instances.
- 04.Rolling Updates - Deploys new agent versions with zero downtime using progressive rollout strategies.
▸Data Layer
A multi-tier data architecture optimized for AI workloads:
PostgreSQL
Primary database for metadata, configurations, user data, and transactional records.
Redis Cluster
In-memory cache for session data, rate limiting, and real-time metrics.
Object Storage (S3-compatible)
Stores agent artifacts, logs, model files, and user uploads.
Vector Database
Optimized storage for embeddings, semantic search, and RAG workflows.
// Request Lifecycle
Here's what happens when a request is made to your deployed agent:
Client sends HTTPS request to your agent endpoint (e.g., my-agent.shellhub.app)
Request is routed to the nearest edge location via our global CDN (Cloudflare)
TLS 1.3 handshake completes, request is decrypted at the API Gateway
API key or JWT token is validated against our auth service
ShellGuard3000 analyzes the request for potential threats
Request is checked against your tier's rate limits
Request is forwarded to the optimal agent instance
Your agent container processes the request
Response is sent back through the same path, with metrics logged
// High Availability
ShellHub is designed for 99.99% uptime with multiple redundancy mechanisms:
Multi-AZ Deployment
Your agents are automatically distributed across multiple availability zones within a region. If one zone fails, traffic is instantly rerouted.
Database Replication
PostgreSQL uses synchronous replication with automatic failover. Redis uses Redis Sentinel for high availability.
Global Load Balancing
DNS-based load balancing directs users to the healthiest endpoint. Health checks run every 10 seconds.
Automatic Recovery
Failed agent instances are automatically replaced within 30 seconds. Kubernetes handles rescheduling and state recovery.
// Network Security
Network Isolation
Each Cloud runs in an isolated Virtual Private Cloud (VPC) with its own network namespace. Agents cannot communicate with other customers' agents unless explicitly connected via Agent Chains.
Encryption in Transit
All traffic is encrypted using TLS 1.3. Internal service-to-service communication uses mutual TLS (mTLS) with auto-rotating certificates.
Encryption at Rest
All data is encrypted at rest using AES-256. Encryption keys are managed via HashiCorp Vault with automatic rotation.
// Service Level Agreement
| Tier | Uptime SLA | Support Response | Credits |
|---|---|---|---|
| Starter | 99.5% | Community | - |
| Pro | 99.9% | 24 hours | 10% per 0.1% below SLA |
| Enterprise | 99.99% | 1 hour | 25% per 0.01% below SLA |