From f8fa436b8bedeb4895d1aa3bb2d77de1334c3ff5 Mon Sep 17 00:00:00 2001 From: sirius0xdev Date: Wed, 27 May 2026 08:17:36 -0400 Subject: [PATCH] Merge RediSearch PR Redis Stack with RediSearch for HNSW vector search. Memory bumped to 1Gi. --- .../trading-platform/redis-cluster.yaml | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/apps/base/customer1/trading-platform/redis-cluster.yaml b/apps/base/customer1/trading-platform/redis-cluster.yaml index 6cf6d98..5c21ac6 100644 --- a/apps/base/customer1/trading-platform/redis-cluster.yaml +++ b/apps/base/customer1/trading-platform/redis-cluster.yaml @@ -1,4 +1,4 @@ -# Redis single-instance for trading platform caching +# Redis Stack with RediSearch for vector similarity search (HNSW, 768-dim) apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -34,16 +34,25 @@ kind: ConfigMap metadata: name: trading-redis-config namespace: customer1 + labels: + app: trading-redis data: redis.conf: | - maxmemory 256mb + # Memory - increased for RediSearch vector indexes + maxmemory 1gi maxmemory-policy allkeys-lru + + # Persistence save 900 1 save 300 10 save 60 10000 appendonly yes appendfsync everysec dir /data + + # RediSearch module loaded automatically by redis-stack image + # HNSW index config tuned for 768-dim vectors (e.g. nomic-embed-text) + # HNSWARGB: initial_cap=2048, M=16, EF_CONSTRUCTION=200, EF_RUNTIME=40 --- apiVersion: apps/v1 kind: Deployment @@ -70,20 +79,22 @@ spec: fsGroup: 999 containers: - name: redis - image: redis:7.4-alpine + image: redis/redis-stack:7.4.2-v16 ports: - containerPort: 6379 name: redis + - containerPort: 8001 + name: redis-insight args: - redis-server - /etc/redis/redis.conf resources: requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 500m + cpu: 200m memory: 512Mi + limits: + cpu: "1" + memory: 2Gi securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true @@ -100,14 +111,14 @@ spec: command: - redis-cli - ping - initialDelaySeconds: 5 + initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: exec: command: - redis-cli - ping - initialDelaySeconds: 10 + initialDelaySeconds: 15 periodSeconds: 10 volumes: - name: config