πŸš€ Multiple Bouncer Deployments

Guide for deploying, scaling, and configuring multiple Control Core bouncers for high-availability production environments.

πŸ“Œ Overview

Control Core bouncers enforce authorization policies at the network layer. Each bouncer:

  • Intercepts traffic to protected applications
  • Evaluates policies in real time
  • Receives policy updates from the Control Plane automatically
  • Can optionally use Work ID for cryptographic workload identity

Deploy multiple bouncers to scale throughput, improve availability, and distribute load.

πŸš€ Deployment Patterns

1. Gateway Pattern (Centralized)

All traffic flows through a centralized bouncer fleet:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Clients │─────►│  Bouncer Fleet (Load Balanced)  │─────►│  Apps   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚  β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”        β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚  β”‚ B1  β”‚ β”‚ B2  β”‚ β”‚ B-N β”‚        β”‚
                 β”‚  β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜        β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Use cases: API Gateway, centralized authorization Advantages: Simple topology, centralized logging Trade-offs: Single point of failure (mitigated with HA)

2. Sidecar Pattern (Distributed)

Each application has a dedicated bouncer:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Clients │─────►│ App 1        β”‚      β”‚ App 2        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚      β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
                 β”‚ β”‚ Bouncer  β”‚ β”‚      β”‚ β”‚ Bouncer  β”‚ β”‚
                 β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚      β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚
                 β”‚      β–Ό       β”‚      β”‚      β–Ό       β”‚
                 β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚      β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
                 β”‚ β”‚ Backend  β”‚ β”‚      β”‚ β”‚ Backend  β”‚ β”‚
                 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚      β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Use cases: Microservices, containerized applications Advantages: Isolated failures, per-app policies Trade-offs: Higher resource usage

3. Hybrid Pattern

Centralized gateway for external traffic, sidecars for internal services:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚External │─────►│  Gateway  │─────►│ Internal Services β”‚
β”‚Clients  β”‚      β”‚  Bouncer  β”‚      β”‚  (with sidecars)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Use cases: Complex architectures, mixed trust zones Advantages: Flexible, defense in depth Trade-offs: Most complex to manage

πŸ€– Failure Semantics (Production)

Enterprise teams should define failure semantics as part of deployment design, not as an afterthought.

  • Primary objective: Preserve protected resource availability during bouncer instance failures.
  • Recommended HA path: Load Balancer -> multiple reverse-proxy bouncers -> protected apps.
  • Degraded policy mode: Maintain a policy-driven baseline route set for low-risk availability endpoints during partial control-plane or enforcement degradation.
  • Strict route classes: Keep high-risk routes fail-closed (admin, write, sensitive data) while allowing degraded behavior only where explicitly approved.

Pattern guidance by SLO

  • If uptime is the top priority: Prefer reverse-proxy fleet with active-active replicas.
  • If isolation is the top priority: Sidecar is strong, but validate listener failure behavior and provide resilient routing design.
  • If both are required: Use hybrid mode with clear route segmentation and documented failover expectations.

πŸ“Œ Resource Sizing

Per-Bouncer Resources

Traffic LoadCPUMemoryConnections
Low (<100 req/s)0.5-11 GB1,000
Medium (100-1,000 req/s)1-22 GB5,000
High (1,000-5,000 req/s)2-44 GB10,000
Very High (5,000+ req/s)4-88 GB20,000+

Fleet Sizing

Expected LoadMin BouncersRecommendedMax (HPA)
Development123
Production (Small)3510
Production (Medium)51030
Production (Large)1020100

πŸ“Œ Configuration

Required Settings

Configure each bouncer with these required values:

SettingDescriptionExample
Control Plane URLAPI endpoint for registration and policy synchttps://api.controlcore.yourcompany.com
API KeyCredentials for Control PlaneFrom Settings β†’ Environments
Bouncer IDUnique identifierbouncer-us-east-1a-001
Environmentsandbox or productionproduction
Target HostProtected application hostbackend.yourapp.com
Target PortProtected application port8080

Optional Settings

SettingDescriptionDefault
Policy sync intervalHow often to check for policy updates30 seconds
Decision cache TTLHow long to cache authorization decisions60 seconds
Policy cache TTLHow long to cache compiled policies300 seconds
Max concurrent requestsConnection limit per bouncer10,000
Request timeoutTimeout for upstream requests30 seconds

Work ID (Optional)

When Work ID is enabled, bouncers obtain cryptographic workload identity for zero-trust communications. See Work ID Configuration for setup.

SettingDescription
Work ID enabledEnable workload identity
Trust domainOrganizational identity boundary
Join tokenOne-time token for bouncer attestation

πŸš€ Kubernetes Deployment

Basic Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: bouncer
  namespace: control-core
spec:
  replicas: 10
  selector:
    matchLabels:
      app: bouncer
  template:
    metadata:
      labels:
        app: bouncer
    spec:
      containers:
        - name: bouncer
          image: controlcore/bouncer:2.0.0
          ports:
            - containerPort: 8080
              name: http
          env:
            - name: CONTROL_PLANE_URL
              value: "https://api.controlcore.yourcompany.com"
            - name: API_KEY
              valueFrom:
                secretKeyRef:
                  name: bouncer-secrets
                  key: api-key
            - name: BOUNCER_ID
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: ENVIRONMENT
              value: "production"
            - name: TARGET_HOST
              value: "backend.yourapp.com"
            - name: TARGET_PORT
              value: "8080"
          resources:
            requests:
              memory: "2Gi"
              cpu: "1000m"
            limits:
              memory: "4Gi"
              cpu: "2000m"
          livenessProbe:
            httpGet:
              path: /health
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /ready
              port: 8080
            initialDelaySeconds: 10
            periodSeconds: 5

High Availability

Spread bouncers across nodes and availability zones:

spec:
  template:
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app: bouncer
                topologyKey: kubernetes.io/hostname
      topologySpreadConstraints:
        - maxSkew: 1
          topologyKey: topology.kubernetes.io/zone
          whenUnsatisfiable: ScheduleAnyway
          labelSelector:
            matchLabels:
              app: bouncer

Auto-Scaling

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: bouncer-hpa
  namespace: control-core
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: bouncer
  minReplicas: 10
  maxReplicas: 50
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 60
    - type: Resource
      resource:
        name: memory
        target:
          type: Utilization
          averageUtilization: 70

Pod Disruption Budget

Ensure minimum availability during upgrades:

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: bouncer-pdb
  namespace: control-core
spec:
  minAvailable: 5
  selector:
    matchLabels:
      app: bouncer

πŸ“Œ Load Balancing

Network Load Balancer (AWS)

apiVersion: v1
kind: Service
metadata:
  name: bouncer
  namespace: control-core
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
    service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
spec:
  type: LoadBalancer
  externalTrafficPolicy: Local
  selector:
    app: bouncer
  ports:
    - name: http
      port: 80
      targetPort: 8080
  sessionAffinity: ClientIP
  sessionAffinityConfig:
    clientIP:
      timeoutSeconds: 10800

Ingress (Layer 7)

Use NGINX Ingress or your cloud provider's load balancer to route traffic to the bouncer service. Configure TLS termination at the ingress layer.

πŸ“Œ Cache Tuning

Load ProfilePolicy Cache TTLDecision Cache TTLCache Size
Low10 min5 min10,000
Medium5 min1 min50,000
High5 min1 min100,000
Very High3 min30 sec500,000

Increase cache TTL for stable policies; decrease when policies change frequently.

πŸ“Œ Monitoring

Health Endpoints

  • Liveness: GET /health β€” Returns 200 when bouncer is running
  • Readiness: GET /ready β€” Returns 200 when ready to accept traffic

Metrics

Bouncers expose Prometheus-compatible metrics. Key metrics:

MetricDescription
Requests totalTotal requests processed
Request durationLatency histogram
Policy decisionsAllow/deny counts
Control Plane latencyResponse time to Control Plane
Cache hits/missesCache effectiveness

Alerts

Set up alerts for:

  • Bouncer unhealthy for > 2 minutes
  • Request error rate > 5%
  • P95 latency > 500ms
  • Policy sync lag > 5 minutes

⚑ Performance Benchmarks

Bouncer CountTotal CapacityLatency (p95)Availability
31,500 req/s<50ms99.5%
105,000 req/s<20ms99.9%
2010,000 req/s<15ms99.95%
5025,000 req/s<10ms99.99%

πŸ› οΈ Troubleshooting

Bouncer not connecting: Verify Control Plane URL is reachable, API key is valid, and firewall allows outbound HTTPS.

High latency: Enable and tune decision cache, increase timeout values, deploy bouncers closer to applications.

Policy not updating: Check policy sync interval, verify Control Plane connectivity, review bouncer logs for sync errors.

All requests denied: Verify policies are enabled and assigned to the correct environment and resource. Test in sandbox first.