Why Workflow DAGs Break at 2,500+ Tenants: Moving Multi-Tenant RAG from Batch Orchestration to Event-Driven Pub/Sub

When building an enterprise Retrieval-Augmented Generation (RAG) platform, the intuitive architectural instinct is to reach for a workflow orchestrator. Tools like Prefect, Airflow, or Dagster look ideal on paper. You define clean directed acyclic graphs: crawl the sitemap, render the DOM, chunk the text, compute embeddings, and upsert vectors. You get visual run dashboards, automatic retries, and task dependencies out of the box. For ten tenants running scheduled nightly batch crawls, workflow DAGs work reliably. In our infrastructure, Prefect 3.x remains an excellent choice for scheduled batch reconciliations, nightly catalog syncs, and administrative ETL workflows. However, for live, multi-tenant ingestion across 2,500+ enterprise tenants handling continuous web updates, unstructured document uploads, and real-time CMS edits, centralized DAG schedulers hit severe mechanical limits. Centralized DAG orchestration assumes batch workloads with predictable state transitions. Multi-tenant enterprise ingestion is not batch; it is erratic, continuous, event-driven, and structurally asynchronous. When thousands of heterogeneous client sites emit micro-deltas concurrently, forcing those updates into heavyweight DAG schedulers burns through infrastructure budgets while introducing seconds of synthetic scheduling lag. Here is why workflow DAGs hit a scaling wall for live workloads, and why we decoupled our ingestion pipeline into an event-driven Pub/Sub streaming architecture. ...

Published: October 16, 2025 · Updated: October 13, 2026 · 6 min · Bharat Singh

Building Self-Discovering AI Agents: Dynamic Tool Discovery with gRPC Reflection and LangGraph

Traditional AI agents break when APIs change or new services deploy. This post demonstrates an architecture for creating truly adaptive agents by combining gRPC Server Reflection with LangGraph. The result: agents that discover, inspect, and integrate new tools at runtime without code changes, manual redeployment, or compile-time schema drift. ...

August 22, 2025 · 5 min · Bharat Singh

The Scaling Dilemma: An Analysis of Tool Quantity and its Impact on ReAct Agent Performance

When enterprise engineering teams scale autonomous agent systems, the default instinct is to expand the agent’s toolset, equipping models with dozens, hundreds, or thousands of API definitions. Empirical benchmarks across state-of-the-art models (including GPT-4o, Claude 3.5 Sonnet, and OpenAI reasoning models) reveal a stark counter-intuitive reality: agent accuracy does not scale with tool count; it collapses. ...

Published: August 15, 2025 · Updated: October 13, 2026 · 22 min · Bharat Singh

The Cognitive Tax of Trivial Helpers: Lessons in Interface Design from the Linux Kernel

During a recent Linux kernel merge window, Linus Torvalds rejected a pull request containing what appeared to be an innocuous helper utility: make_u32_from_two_u16(a, b) The review was characteristically blunt, but setting aside the rhetoric, the technical critique addresses a fundamental anti-pattern prevalent across software engineering: the creation of trivial abstractions that increase cognitive load rather than reducing it. In modern software development, across kernel subsystems and enterprise microservices alike, teams frequently mistake abstraction for clarity. Examining why this specific helper failed offers enduring principles for API design, code review standards, and engineering leadership. ...

August 12, 2025 · 4 min · Bharat Singh