Building Scalable RAG Pipelines with Java and Kubernetes
summary
Shows a microservice RAG stack built in Java that actually runs on Kubernetes: a stateless orchestrator calling a retriever backed by Weaviate and a generator served with QServe/Gemma on GKE. Claims ingestion = extract/chunk/embed/load, caching with Redis cuts vector DB latency by an order of magnitude, fallback to OpenSearch when vectors fail, and observability via Prometheus, Grafana and OpenTelemetry. Demo aims at scaling to a few thousands requests per second but shows GPU scale‑to‑zero and cold start issues.
AI-written summary · about
chapters (39)
- 0:00🚀 Build Stuff Conference – Get Your Tickets!
- 0:18Introduction to Scalable RAG with Java and Kubernetes
- 1:00What RAG Is: Retrieval, Augmentation, and Generation
- 2:08Why RAG Matters: Hallucinations, Stale Knowledge, and Private Data
- 3:31The Problem with Most RAG Tutorials and Demo Apps
- 4:26Why a Monolith Breaks Down for Production RAG
- 5:24A Microservice Architecture for RAG Pipelines
- 6:18The Orchestrator, Retriever, and Generator Roles
- 7:18End-to-End Request Flow Through the RAG System
- 8:22Why Java for AI Applications
- 9:04Spring AI vs. LangChain4j
- 10:55The Retrieval Layer: Ingestion and Online Search
- 12:00Ingestion Pipeline: Extract, Chunk, Embed, Load
- 13:35Online Retrieval Flow and Similarity Search
- 14:45Vector Database Options: Weaviate, Milvus, pgvector, Redis, and More
- 15:53Spring AI Vector Store Integration
- 16:43Caching Retrieved Results with Redis
- 17:43Failure Handling and Fallback Search Strategies
- 18:42The Generation Layer and Prompt Engineering
- 19:34LLM Options: Hosted APIs vs. Self-Hosted Models
- 20:40Prompt Templating with Spring AI
- 21:28Streaming Responses with Flux and Reactive Java
- 22:20Why Kubernetes Fits This Architecture
- 23:06Scaling Stateless Orchestrators, Vector Stores, and GPU-Based LLMs
- 24:25HPA, KEDA, and Service Mesh Considerations
- 25:35Multi-Region Challenges for RAG Systems
- 26:54Observability: Logs, Metrics, and Traces
- 27:48Using OpenTelemetry for Distributed Tracing
- 28:27How Traces Reveal Bottlenecks in Retrieval Latency
- 29:09Dashboards with Grafana and Prometheus
- 29:52Live Demo: RAG App Architecture and Components
- 31:06Reviewing the Java/Spring Boot Project Structure
- 31:54QServe and Gemma Deployment in Kubernetes
- 32:42Demo Walkthrough: Orchestrator, Retriever, OpenSearch, Redis, and Weaviate
- 33:40Demo Requests, Caching, and Scale-to-Zero Behavior
- 35:16Prometheus Metrics Endpoint and Kubernetes Health Checks
- 36:09Load Testing and Watching Metrics in Grafana
- 37:18Tracking Retrieval Requests, Fallbacks, and Latency Trends
- 38:15Final Thoughts and Q&A
related talks
25mComposable RAG Pipelines With OPEA Highlighting GraphRAG
46mBlow past benchmarks using vector search and RAG with Elasticsearch
27mGen-AI at Scale: Simplifying Orchestration of Healthcare Applications Across Multi-Cluster Environme
19mBuilding Production-Ready RAG Systems
02h 47mFrom naive to advanced RAG: the complete guide
15mAgentic RAG on Kubeflow
26mResource-Aware Scheduling for Production GenAI with RAG running on Multicluster Cloud Kubernetes
19mScalable Data and AI Solutions with Cloud-Native Architecture
