Multi-Tenancy Models and Isolation Strategies
Overview
Prism is designed to support multiple tenancy models with configurable component isolation at the proxy level. This flexibility allows organizations to choose the right balance between resource efficiency, performance isolation, security boundaries, and operational complexity based on their specific requirements.
This memo explores three primary tenancy models and three isolation levels, providing guidance on when to use each approach and how to configure Prism accordingly.
Tenancy Models
1. Single Tenancy (Self-Managed)
Architecture: One proxy deployment per tenant, fully isolated infrastructure.
┌─────────────────────────────────────────────────────┐
│ Tenant A (Large Enterprise Application) │
│ │
│ ┌──────────────────────────────────────── ──┐ │
│ │ Prism Proxy Cluster (N-way deployment) │ │
│ │ │ │
│ │ ┌────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │Proxy-1 │ │Proxy-2 │ │Proxy-N │ │ │
│ │ └────────┘ └────────┘ └────────┘ │ │
│ └──────────────────────────────────────────┘ │
│ │ │ │ │
│ └───────────┴───────────┘ │
│ │ │
│ ┌──────────────────────────────────────────┐ │
│ │ Dedicated Backend Infrastructure │ │
│ │ • Redis cluster │ │
│ │ • NATS cluster │ │
│ │ • PostgreSQL instance │ │
│ │ • Kafka cluster │ │
│ └──────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────┐
│ Tenant B (Separate Infrastructure) │
│ [Similar isolated deployment] │
└─────────────────────────────────────────────────────┘
Use Cases:
- Large enterprise applications with high throughput requirements (>10K RPS)
- Regulatory compliance requirements mandating physical infrastructure separation (HIPAA, PCI-DSS, FedRAMP)
- Noisy neighbor elimination for mission-critical applications
- Independent upgrade cycles - tenant controls when to upgrade Prism versions
- Custom performance tuning - dedicated resources can be sized precisely for workload
Characteristics:
- Complete isolation: No shared infrastructure between tenants
- Dedicated resources: CPU, memory, network, storage all tenant-specific
- Independent lifecycle: Each tenant deployment can be upgraded, scaled, or maintained independently
- Maximum performance: No resource contention with other tenants
- Higher cost: Full infrastructure stack per tenant
Configuration Example (single-tenant-config.yaml
):
deployment:
model: single_tenant
tenant_id: enterprise-customer-a
proxy:
replicas: 5 # N-way deployment
resources:
cpu: "4"
memory: "8Gi"
# Each tenant gets dedicated proxy cluster
cluster:
mode: dedicated
load_balancer: haproxy # or nginx, envoy
backends:
# All backends are tenant-specific
redis:
endpoint: "redis.tenant-a.svc.cluster.local:6379"
isolation: physical
nats:
endpoint: "nats.tenant-a.svc.cluster.local:4222"
isolation: physical
postgres:
endpoint: "postgres.tenant-a.svc.cluster.local:5432"
database: "tenant_a_db"
isolation: physical
observability:
# Dedicated observability stack
metrics_endpoint: "prometheus.tenant-a.svc:9090"
traces_endpoint: "tempo.tenant-a.svc:4317"
logs_endpoint: "loki.tenant-a.svc:3100"
Deployment Patterns:
-
Kubernetes Namespace per Tenant:
kubectl create namespace tenant-a
helm install prism-proxy prism/proxy \
--namespace tenant-a \
--values tenant-a-values.yaml -
Bare Metal / VM Deployment:
# Each tenant gets dedicated servers
ansible-playbook deploy-prism.yml \
--extra-vars "tenant_id=tenant-a servers=proxy-a-[1:5]" -
Cloud Provider (AWS):
module "prism_tenant_a" {
source = "./modules/prism-single-tenant"
tenant_id = "tenant-a"
vpc_id = aws_vpc.tenant_a.id
proxy_count = 5
instance_type = "c6i.2xlarge"
}
Operational Considerations:
- Cost: Highest per-tenant cost due to dedicated infrastructure
- Maintenance: Requires separate maintenance windows per tenant
- Monitoring: Dedicated observability stack per tenant increases operational overhead
- Networking: Requires careful network segmentation and firewall rules
- Disaster Recovery: Each tenant needs independent backup and recovery procedures
2. Multi-Tenant (Shared Proxy Pool)
Architecture: Control plane manages pool of proxies using prism-bridge
, serving multiple tenants.
┌─────────────────────────────────────────────────────────────┐
│ Prism Control Plane (prism-bridge) │
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Namespace Registry │ │
│ │ • tenant-a → proxy-pool-1 │ │
│ │ • tenant-b → proxy-pool-1 │ │
│ │ • tenant-c → proxy-pool-2 (premium tier) │ │
│ └──────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Load Balancer Integration │ │
│ │ • HAProxy config generation │ │
│ │ • DNS-based routing │ │
│ │ • Service mesh integration (Istio/Linkerd) │ │
│ └──────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
│ │ │