|
Some checks failed
Veza CI / Backend (Go) (push) Failing after 8m56s
Veza CI / Frontend (Web) (push) Has been cancelled
E2E Playwright / e2e (full) (push) Has been cancelled
Veza CI / Notify on failure (push) Blocked by required conditions
Veza CI / Rust (Stream Server) (push) Successful in 5m3s
Security Scan / Secret Scanning (gitleaks) (push) Failing after 53s
Three Incus containers, each running redis-server + redis-sentinel (co-located). redis-1 = master at first boot, redis-2/3 = replicas. Sentinel quorum=2 of 3 ; failover-timeout=30s satisfies the W3 acceptance criterion. - internal/config/redis_init.go : initRedis branches on REDIS_SENTINEL_ADDRS ; non-empty -> redis.NewFailoverClient with MasterName + SentinelAddrs + SentinelPassword. Empty -> existing single-instance NewClient (dev/local stays parametric). - internal/config/config.go : 3 new fields (RedisSentinelAddrs, RedisSentinelMasterName, RedisSentinelPassword) read from env. parseRedisSentinelAddrs trims+filters CSV. - internal/metrics/cache_hit_rate.go : new RecordCacheHit / Miss counters, labelled by subsystem. Cardinality bounded. - internal/middleware/rate_limiter.go : instrument 3 Eval call sites (DDoS, frontend log throttle, upload throttle). Hit = Redis answered, Miss = error -> in-memory fallback. - internal/services/chat_pubsub.go : instrument Publish + PublishPresence. - internal/websocket/chat/presence_service.go : instrument SetOnline / SetOffline / Heartbeat / GetPresence. redis.Nil counts as a hit (legitimate empty result). - infra/ansible/roles/redis_sentinel/ : install Redis 7 + Sentinel, render redis.conf + sentinel.conf, systemd units. Vault assertion prevents shipping placeholder passwords to staging/prod. - infra/ansible/playbooks/redis_sentinel.yml : provisions the 3 containers + applies common baseline + role. - infra/ansible/inventory/lab.yml : new groups redis_ha + redis_ha_master. - infra/ansible/tests/test_redis_failover.sh : kills the master container, polls Sentinel for the new master, asserts elapsed < 30s. - config/grafana/dashboards/redis-cache-overview.json : 3 hit-rate stats (rate_limiter / chat_pubsub / presence) + ops/s breakdown. - docs/ENV_VARIABLES.md §3 : 3 new REDIS_SENTINEL_* env vars. - veza-backend-api/.env.template : 3 placeholders (empty default). Acceptance (Day 11) : Sentinel failover < 30s ; cache hit-rate dashboard populated. Lab test pending Sentinel deployment. W3 verification gate progress : Redis Sentinel ✓ (this commit), MinIO EC4+2 ⏳ Day 12, CDN ⏳ Day 13, DMCA ⏳ Day 14, embed ⏳ Day 15. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api_key_rate_limiter.go | ||
| api_key_rate_limiter_test.go | ||
| api_key_scope.go | ||
| api_key_scope_test.go | ||
| audit.go | ||
| audit_test.go | ||
| auth.go | ||
| auth_middleware_test.go | ||
| cache_headers.go | ||
| cache_headers_test.go | ||
| captcha.go | ||
| captcha_test.go | ||
| ccpa.go | ||
| ccpa_test.go | ||
| context_propagation.go | ||
| cors.go | ||
| cors_test.go | ||
| csrf.go | ||
| csrf_integration_test.go | ||
| endpoint_limiter.go | ||
| error_handler.go | ||
| error_handler_metrics_test.go | ||
| error_handler_structured_test.go | ||
| error_handler_test.go | ||
| general.go | ||
| maintenance.go | ||
| maintenance_test.go | ||
| metrics.go | ||
| metrics_protection.go | ||
| metrics_protection_test.go | ||
| metrics_test.go | ||
| mfa_enforcement_test.go | ||
| monitoring.go | ||
| ownership_integration_test.go | ||
| playlist_permission.go | ||
| playlist_permission_test.go | ||
| rate_limit_login_test.go | ||
| rate_limiter.go | ||
| rate_limiting_integration_test.go | ||
| ratelimit.go | ||
| ratelimit_redis.go | ||
| ratelimit_test.go | ||
| rbac_auth_middleware_test.go | ||
| rbac_middleware.go | ||
| rbac_middleware_test.go | ||
| recovery.go | ||
| recovery_env_test.go | ||
| recovery_test.go | ||
| request_id.go | ||
| request_id_test.go | ||
| request_logger.go | ||
| request_logger_test.go | ||
| response_cache.go | ||
| response_cache_test.go | ||
| security_headers.go | ||
| security_headers_test.go | ||
| sentry_recover.go | ||
| stream_callback_auth.go | ||
| timeout.go | ||
| timeout_goroutine_test.go | ||
| timeout_test.go | ||
| tracing.go | ||
| tracing_test.go | ||
| upload_rate_limit_test.go | ||
| user_rate_limiter.go | ||
| validation.go | ||
| validation_test.go | ||
| versioning.go | ||
| webhook_api_key.go | ||