AISBF Logo AISBF

AI Service Broker Framework — AI Should Be Free

AISBF operations

Complex AISBF Cluster Configuration

Configure AISBF for production clusters with shared MySQL, Redis, response cache, MCP tokens, load balancing, and dashboard-managed tenant routes.

Cluster shape

Stateless AISBF nodes

Run two or more AISBF app processes behind nginx, HAProxy, Caddy, or Kubernetes ingress.

Shared MySQL

Stores users, tokens, provider configs, rotations, autoselects, account tiers, and dashboard-managed state.

Shared Redis

Stores cache/session-like runtime state and response-cache entries when enabled.

Production config

This is the minimum cluster-minded config: shared DB, shared cache, response cache, and MCP/admin tokens separated by privilege.

{
  "server": {"host": "0.0.0.0", "port": 17765, "protocol": "http"},
  "database": {"type": "mysql", "mysql_host": "mysql.internal", "mysql_port": 3306, "mysql_user": "aisbf", "mysql_password": "${AISBF_MYSQL_PASSWORD}", "mysql_database": "aisbf"},
  "cache": {"type": "redis", "redis_host": "redis.internal", "redis_port": 6379, "redis_db": 0, "redis_password": "${AISBF_REDIS_PASSWORD}", "redis_key_prefix": "aisbf:prod:"},
  "response_cache": {"enabled": true, "backend": "redis", "ttl": 600, "redis_host": "redis.internal", "redis_key_prefix": "aisbf:response:"},
  "mcp": {"enabled": true, "autoselect_tokens": ["${AISBF_MCP_ROUTE_TOKEN}"], "fullconfig_tokens": ["${AISBF_MCP_ADMIN_TOKEN}"]}
}

Load balancer example

upstream aisbf_backend { least_conn; server aisbf-1.internal:17765 max_fails=3 fail_timeout=30s; server aisbf-2.internal:17765 max_fails=3 fail_timeout=30s; server aisbf-3.internal:17765 max_fails=3 fail_timeout=30s; }
server { listen 443 ssl http2; server_name aisbf.example.com; location / { proxy_pass http://aisbf_backend; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffering off; } }

Dashboard checklist

  1. Settings → Database: set MySQL and test the connection.
  2. Settings → Cache: set Redis, choose a unique production key prefix, and enable response cache only where safe.
  3. Users: issue per-user tokens rather than sharing global tokens.
  4. User Providers: store tenant-owned provider credentials in user scope when possible.
  5. Rotations / Autoselect: promote stable route names to apps; avoid app code depending on pod/provider internals.
AISBF dashboard database settings for MySQL production config.
Database settings: use MySQL when multiple AISBF nodes must share state.
AISBF dashboard cache settings for Redis and response cache.
Cache settings: Redis gives cluster nodes a shared cache namespace.

Deployment verification

curl -fsS https://aisbf.example.com/health
curl -fsS -H "Authorization: Bearer $AISBF_API_TOKEN" https://aisbf.example.com/api/u/$AISBF_USERNAME/models
curl -fsS -H "Authorization: Bearer $AISBF_API_TOKEN" https://aisbf.example.com/api/u/$AISBF_USERNAME/rotations

Try AISBF

AISBF is open source and also available as a hosted service. During the current testing period, hosted Pro is temporarily available as unlimited access for €2/month.