Skip to main content

Limits Reference

All limits are extracted from the service config.go files and project_context_map.md §13. Environment variable names are the override mechanism — see Configuration Reference. Default values apply when the environment variable is absent.


Gateway

LimitDescription
Rate limit — sustained RPSLocal token-bucket, per IP. Default: 10 000 req/s Env: RATE_LIMIT_RPS
Rate limit — burstInstantaneous headroom above RPS. Default: 20 000 req/s Env: RATE_LIMIT_BURST
Rate limit — windowSliding window for Valkey-backed cap. Default: 60 s Env: RATE_LIMIT_WINDOW
Rate limit — global capValkey sliding window hard cap. Default: 1 000 000 req/window Env: RATE_LIMIT_MAX_REQUESTS
Circuit breaker — failure thresholdImplemented per upstream service. Default: 5 errors / 30 s
Circuit breaker — open timeoutAfter open, one probe request. Default: 60 s
DB pool — max open connectionsPer service instance. Default: 25 Env: DB_MAX_OPEN_CONNS
DB pool — max idle connectionsPer service instance. Default: 5 Env: DB_MAX_IDLE_CONNS
DB pool — conn max lifetimePrevents stale connections. Default: 5 min Env: DB_CONN_MAX_LIFETIME
DB pool — conn max idle timeEvicts idle connections. Default: 1 min Env: DB_CONN_MAX_IDLE_TIME

IAM Service

LimitDescription
JWT access token TTLES256 signed. Default: 15 min Env: JWT_ACCESS_TOKEN_TTL
JWT refresh token TTLStored in Valkey. Default: 7 days Env: JWT_REFRESH_TOKEN_TTL
JWT rotation grace periodDual-key overlap during rotation. Default: 24 h
JWT rotation intervalVia Vault. Default: 90 days
Delegation token TTLB2B2B parent-on-behalf-of-child. Default: 3 600 s (1 h) Env: DELEGATION_TOKEN_TTL
Password min lengthNIST 800-63B. Default: 12 chars
TOTP recovery codesOne-time-use, bcrypt-hashed. Default: 10 codes
Invite expiryConstant-time response (anti-enum). Default: 72 h
OAuth callback timeoutState parameter TTL. Default: 10 min
Idempotency key windowDedup via Valkey. Default: 24 h

Data Layer

LimitDescription
Max record sizeEntire JSON document. Default: 1 MB Env: DATA_MAX_RECORD_SIZE_BYTES
Max JSONB fieldPer JSONB column. Default: 256 KB Env: DATA_MAX_JSONB_SIZE_BYTES
Max tables per moduleAt manifest validation. Default: 50 Env: DATA_MAX_TABLES_PER_MODULE
Max relation depth?select=field,relation(field). Default: 2 levels
Max filters per queryURL query parameters. Default: 10
Max rows per pagelimit query parameter. Default: 100
CDC pipeline latencyPostgreSQL → Kafka → ClickHouse. Default: < 5 s

Event Bus

LimitDescription
Kafka event retentionDomain events. Default: 168 h (7 days) Env: KAFKA_RETENTION_HOURS
Kafka audit event retentionplatform.audit.events. Default: 720 h (30 days) Env: KAFKA_AUDIT_RETENTION_HOURS
Kafka max delivery attemptsAfter exhaustion → DLQ. Default: Configurable Env: KAFKA_MAX_ATTEMPTS
Kafka topicsplatform.{auth,module,money,files,notify,audit,billing,data}.events. Default: 8
Partition keyUUID v7 (time-sortable). Default: entityId

Notification Service

LimitDescription
Rate limit — per tenantHard cap, returns 429. Default: 100/min Env: NOTIFY_RATE_LIMIT_PER_TENANT
Rate limit — per moduleSub-cap within tenant limit. Default: 50/min
Batch send — max itemsPOST /api/v1/notifications/batch. Default: 500
Retry attemptsBefore moving to DLQ. Default: 5
Retry backoff — initial delayExponential, ±10% jitter. Default: 30 s
Retry backoff — max delayCap on exponential growth. Default: 480 s (8 min)
WebSocket — max connectionsPer tenant. Default: 1 000 Env: NOTIFY_WS_MAX_CONNECTIONS_PER_TENANT
WebSocket — max message ratePer tenant. Default: 200 msg/s
WebSocket — heartbeat intervalPing/pong. Default: 30 s
WebSocket — heartbeat timeoutConnection drop on miss. Default: 10 s
WebSocket — reconnect backoff maxExponential + jitter. Default: 30 s
Replay buffer sizePer channel, Valkey-backed. Default: 100 messages Env: WS_REPLAY_BUFFER_SIZE
Replay buffer TTLMessages expire after this. Default: 3 600 s (1 h) Env: WS_REPLAY_BUFFER_TTL_SEC
Notification history retentionPostgreSQL. Default: 90 days Env: NOTIFY_HISTORY_RETENTION_DAYS

File Storage

LimitDescription
Max image sizeClamAV scanned before move. Default: 10 MB Env: FILES_MAX_IMAGE_SIZE_MB
Staging bucket TTLFiles not moved stay in staging. Default: 24 h Env: FILES_STAGING_TTL_HOURS
Max pending uploads per tenantSimultaneous in-progress uploads. Default: 100
Soft-delete retentionRecoverable via restore. Default: 30 days Env: FILES_SOFT_DELETE_RETENTION_DAYS
Orphan scan intervalBackground cleanup worker. Default: 24 h Env: FILES_ORPHAN_SCAN_INTERVAL_HOURS
Presigned URL TTL (upload)Default varies by deployment. Default: Configurable Env: FILES_PRESIGN_TTL
Thumbnail presetsicon_32, avatar_64, card_300, preview_600, full_1200. Default: 5

Money Service

LimitDescription
Max transaction amount10 000 000 cents, BIGINT. Default: $100 000
Max wallet balance100 000 000 cents, plan-enforced. Default: $1 000 000
Min transaction amount1 cent. Default: $0.01
Hold default TTLAuto-expires, released back. Default: 72 h Env: MONEY_HOLD_TTL_HOURS
Hold max TTLHard cap, enforced at service. Default: 7 days
Max concurrent holds per walletReturns 422 beyond cap. Default: 100 Env: MONEY_MAX_HOLDS_PER_WALLET
Reversal windowAfter original transaction. Default: 365 days Env: MONEY_REVERSAL_MAX_AGE_DAYS
Hold cleanup intervalBackground worker ticker. Default: 60 s Env: MONEY_HOLD_CLEANUP_INTERVAL_SEC
Idempotency key requiredAll write operations. Default: Yes (mandatory)

Audit Log Service

LimitDescription
Hot storage retentionClickHouse ReplacingMergeTree. Default: 90 days Env: AUDIT_HOT_DAYS
Cold storage retentionS3 Glacier. Default: 7 years Env: AUDIT_COLD_YEARS
WAL fallback retentionPostgreSQL audit_wal replay buffer. Default: 7 days
Batch write max itemsPOST /api/v1/audit/batch. Default: Unlimited

Billing Service

LimitDescription
Grace periodFull access retained. Default: 7 days after due
Suspension periodRead-only access. Default: Days 8–37 after due
TerminationSoft-delete, 90-day data retention. Default: Day 38+
Cache TTL (billing plan)Gateway Valkey cache. Default: 15 min Env: BILLING_CACHE_TTL
GDPR crypto-wipe delayAfter deletion request. Default: 30 days Env: BILLING_CRYPTO_WIPE_PERIOD_DAYS

Integration Hub

LimitDescription
Rate limit — outgoing per providerToken bucket. Default: 100 req/s Env: INTEGRATION_RATE_LIMIT_PER_SEC
Max retry attemptsExponential backoff before DLQ. Default: 5
Circuit breaker — failure thresholdsony/gobreaker. Default: 5 errors / 30 s
Circuit breaker — open timeoutHALF_OPEN probe after timeout. Default: 60 s

Domain Resolver

LimitDescription
Max custom domains per tenantReturns 422 beyond cap. Default: 5 Env: DOMAINS_MAX_PER_TENANT
DNS verification TTLVerification link expiry. Default: 72 h Env: DOMAINS_VERIFY_TTL_HOURS
SSL renewal windowLet's Encrypt ACME auto-renew. Default: 30 days before expiry Env: DOMAINS_SSL_RENEW_DAYS_BEFORE

Feature Flags

LimitDescription
Max flags per tenant0 = no cap. Default: 0 (unlimited) Env: FLAGS_MAX_PER_TENANT
SDK in-memory cache TTLRefresh interval via polling. Default: 15 s
Default when service downSafe fail-off. Default: false

Infrastructure

ResourceDescription
Kafka max message sizeDefault Kafka message.max.bytes. Limit: 1 MB
PostgreSQL max connectionsDB_MAX_OPEN_CONNS × instances. Limit: 100 per service (pool)
Valkey key TTL (session cache)Mirrors JWT exp claim. Limit: Per-token TTL
S3 max object sizeSeaweedFS / AWS S3 native limit. Limit: 5 TB
ClickHouse insert batchRecommended: ≥ 1 000 rows/batch. Limit: Configurable

See Also