Skip to main content

Bassirah Technology

REFERENCE ARCHITECTURE · ENTERPRISE AI & LLMOPS

Production AI Requires More Than a Model.

Instrument your AI applications and agents with a dependable observability platform. This reference architecture covers where Langfuse, ClickHouse, PostgreSQL, Redis and MinIO AIStor fit—and where LLM inference, retrieval, permissions and application orchestration remain separate decisions.

For AI engineering leaders · platform engineers · enterprise architects. Stack: Langfuse · ClickHouse · PostgreSQL · Redis · MinIO AIStor

THE CHALLENGE

AI Demos Are Easy. Operating AI Is Not.

Once an LLM application or agent reaches real users, teams need to see what it did, why it did it, what it cost and whether quality is improving or regressing. That visibility depends on an observability platform with its own databases, queues and storage, which must be sized, secured and recovered like any other production system. At the same time, prompts and responses can contain personal or confidential data, so telemetry itself becomes a governed data asset.

  • Limited visibility — No consistent trace of prompts, retrieval steps, tool calls, model responses, latency and token cost across applications and agents.
  • Quality without measurement — Changes to prompts, models or retrieval are shipped without evaluation scores or regression baselines.
  • Hidden runtime dependencies — Self-hosted observability needs transactional, analytical, queue and object storage components that are often under-sized or unowned.
  • Sensitive telemetry — Traces may capture personal, financial or proprietary content that must be masked, retained and located according to policy.
Abstract illustration of AI requests passing through inspection and masking stages

ARCHITECTURE OVERVIEW

How Requests and Telemetry Flow

The pattern separates three concerns: the AI application path that serves users, the observability platform that records and evaluates what happened, and the controls that protect both. Langfuse observes the application; it does not run your models, retrieval or permissions.

The diagram has three zones above a band of shared controls. On the left, in the customer AI application zone, users send requests to an AI application or agent orchestrator, which contains the Langfuse SDK. The orchestrator calls an LLM inference service and a retrieval or vector store; both sit in a separate area labelled as outside Langfuse, because Langfuse does not provide models, retrieval or permissions (step 1). An optional semantic cache, a separate Redis instance owned by the application, can answer repeated prompts or retrieval requests (step 5). The orchestrator sends masked traces, observations and scores across a trust boundary into the LLM observability platform, which runs in a private network (step 2). Inside the platform, the Langfuse Web and API service stores raw event payloads in MinIO AIStor object storage and places jobs on a required Redis or Redis-compatible queue; the Langfuse Worker takes jobs from that queue (step 3). The worker writes trace, observation and score analytics into ClickHouse and reads or writes payloads in object storage, while the web service keeps projects, prompts, configuration and users in PostgreSQL (step 4). Platform and AI engineers use the Langfuse interface to review traces, run evaluations and manage prompts, which queries ClickHouse and PostgreSQL. A band along the bottom shows controls applied to every zone: identity and single sign-on, secrets, encryption, network and egress policy, monitoring and alerting, and backup, restore and HA/DR (step 6). Colour coding marks Langfuse, Redis and MinIO AIStor as strategic partner platforms, PostgreSQL as independently supported open source, ClickHouse as available through either route, and the application, users and AI runtime as customer-owned.

Enterprise AI and LLMOps reference architecture showing an AI application sending masked telemetry to Langfuse, which uses Redis, PostgreSQL, ClickHouse and MinIO AIStor.

Figure 1. Enterprise AI & LLMOps reference architecture (conceptual). Colour key: see How to read our diagrams.

Logical Request and Telemetry Flow

  1. Call the model and retrievalApplication / agent orchestrator calls an LLM or retrieval layer; the model provider or self-hosted inference service is external to Langfuse.
  2. Emit masked telemetryApplication SDK emits traces, observations, scores and evaluations into Langfuse Web/API; appropriate privacy controls mask or filter sensitive content.
  3. Queue asynchronous workLangfuse Worker processes asynchronous work. Redis or compatible cache/queue supports event buffering and background jobs.
  4. Store analytics, state and blobsClickHouse stores observability trace/observation/score analytics; PostgreSQL supports transactional application metadata and configuration; S3-compatible MinIO AIStor stores event blobs and multimodal assets.
  5. Optional semantic cacheOptional separate Redis semantic cache accelerates AI application retrieval or repeated prompts; it must not be confused with Langfuse’s required Redis queue/cache usage.
  6. Protect the full systemIdentity, networking, secrets, encryption, retention, backup/restore, alerting and deployment-specific HA/DR protect the full system.

Conceptual pattern. Connectors, licensed capabilities, versions, security policies and topology are validated in a project-specific architecture.

Last reviewed: — · Version scope: —

COMPONENT ROLES

Who Does What in the Stack

Each component has one clear responsibility. Classifications show whether a component is delivered through a strategic technology partner or independent open-source engineering.

Who Does What in the Stack
ComponentClassificationRoleQualification
Langfuse (Web/API + Worker)Strategic partnerInstrument, trace, evaluate and manage prompt-related workflowsExact features depend on deployed version and edition
ClickHousePartner-led or ClickHouse OSS routeLangfuse analytical events and query servingDo not write custom events directly to Langfuse internal tables
PostgreSQLIndependent OSS supportTransactional Langfuse application stateRequired in supported self-hosted patterns
Redis / compatibleStrategic partner (Redis)Ingestion queue and application cacheQueue durability, eviction mode and sizing require design
MinIO AIStorStrategic partnerS3-compatible blob assets, raw/multimodal dataValidate object-store config and residency requirements
AI runtime / vector retrievalCustomer-owned or separately selectedApplication/inference-side model and retrieval choicesNot provided automatically by the Langfuse observability platform

Already running Langfuse?

We can review sizing, queue configuration and recovery for your current release.

DESIGN TRADEOFFS

Decisions That Shape the Platform

There is no single correct deployment. These are the decisions we work through with your team, with the evidence needed to close each one.

Decisions That Shape the Platform
DecisionOptionsChoose based onValidate with
Langfuse hosting modelSelf-hosted in customer infrastructure · Vendor-hosted cloud, where applicableData residency, telemetry sensitivity, operating capacity, required enterprise featuresData-flow review, edition/feature check, residency sign-off
ClickHouse support routePartner-led ClickHouse · Independently operated ClickHouse OSSRequired commercial assurances, scale, in-house skillsVersion compatibility with the selected Langfuse release, ingest load test
Langfuse queue/cacheRedis · Redis-compatible service supported by the Langfuse releaseDurability needs, HA topology, existing platform standardsEviction policy set so queued jobs are never evicted; failover test
Application semantic cacheNone · Separate Redis instance for prompt/retrieval cachingRepeat-query rate, freshness tolerance, data sensitivity of cached responsesHit-rate and correctness sampling; kept separate from the Langfuse queue
Blob storageMinIO AIStor in customer-controlled infrastructure · Other S3-compatible storeResidency, multimodal volume, lifecycle and retention policiesLangfuse S3 configuration test, bucket policies, lifecycle rules
Telemetry content policyFull capture · Masked capture · Metadata-only for sensitive flowsPrivacy obligations, debugging needs, retention costRedaction tests on representative prompts; retention job verification
  • Langfuse is not a model gateway, vector database or access-control layer for your AI application. Those remain separate design decisions.
  • Observability supports quality improvement; it does not guarantee correct model output.
  • Do not send application business events into Langfuse’s internal ClickHouse tables. Use the supported SDK and API ingestion paths.

Compare ClickHouse support routes →

SECURITY & RESILIENCE

Treat AI Telemetry as a Governed Data Asset

Controls are designed for your environment and obligations. The items below are the conditions we design and test for, not default guarantees.

Identity & access

Integrate Langfuse sign-in with your identity provider where the deployed edition supports it. Apply least-privilege project roles and separate API keys per application and environment.

Privacy & masking

Mask or filter sensitive fields in the application SDK before telemetry leaves the application. Define which flows send full content, masked content or metadata only.

Encryption & secrets

Encrypt traffic between applications, Langfuse and its data stores, and encrypt data at rest where the selected components support it. Keep credentials in your secrets manager, never in images or code.

Network & egress

Place Langfuse and its stores in a private network segment. Review all outbound connections, including model providers and any product telemetry, against your egress policy.

Backup & recovery

Define RPO/RTO separately for PostgreSQL, ClickHouse, the Redis queue and object storage, then run a restoration drill. Recovery of one store without the others can leave telemetry inconsistent.

Monitoring & HA

Monitor queue depth, worker lag, ClickHouse ingest and disk, PostgreSQL health and storage growth. Apply deployment-specific high availability once the throughput and recovery objectives are agreed.

PROOF & OUTCOMES

What We Validate Before Go-Live

We do not publish generic performance or quality promises. Instead, every engagement measures the pattern against your applications and agreed acceptance criteria.

Engineering Validation Checklist

  • Instrumented trace coverage
  • Field redaction and retention rules
  • High-throughput ingest load test
  • Upgrade / version compatibility
  • Secrets and IAM
  • Resilient PostgreSQL, ClickHouse, Redis and object store
  • Rollback and restoration drill
  • Data location / egress review

Measurement Plan

Measurement Plan
MetricHow it is measuredTarget
Trace completenessShare of production requests and agent steps that produce a complete traceAgreed per application in the PoC
Evaluation qualityCoverage of evaluation scores and datasets for priority use cases; regression detection on prompt or model changesAgreed with AI product owners
Cost visibilityShare of model calls with token usage and cost attributed to application, team or tenantAgreed per cost-allocation model
Ingest headroomSustained events per second at peak with acceptable queue depth and worker lagDerived from forecast peak plus margin
Incident recoveryTime to restore observability service and data from backup in a drillAgreed RPO/RTO per store

What You Receive

  • Target architecture and component sizing for the selected Langfuse release
  • Telemetry data-classification and masking policy
  • Load-test and restoration-drill results against agreed criteria
  • Runbooks for upgrades, scaling and incident response
  • Knowledge transfer to your platform and AI engineering teams

Enterprise AI & LLMOps FAQs

In supported self-hosted patterns, Langfuse runs a web/API service and an asynchronous worker. It relies on PostgreSQL for transactional application data, ClickHouse for traces, observations and scores, Redis or a compatible service for queuing and caching, and S3-compatible object storage for event payloads and multimodal assets. Exact versions depend on the Langfuse release.

Not by default. Langfuse requires Redis (or a compatible service) for its own ingestion queue and caching. A semantic cache for repeated prompts or retrieval results is an optional, separate application component. Keep them on separate instances with separate sizing, eviction and security policies.

No. Langfuse observes, traces and evaluates AI applications. Model inference, vector retrieval, orchestration and user permissions remain in your application stack or with your chosen model provider.

No tool can guarantee correct model output. Tracing, evaluation and monitoring help you detect, measure and reduce quality problems over time, and give reviewers evidence about what an application did.

Apply masking or filtering in the application SDK before data is sent, decide which flows send full, masked or metadata-only telemetry, and set retention rules for stored traces and blobs. We test redaction with representative prompts before go-live.

Yes, where the ClickHouse version is compatible with your Langfuse release. Bassirah can operate ClickHouse OSS as independent engineering, or deliver ClickHouse through the partner route when commercial assurances are required.

Operate AI with Visibility, Control and Engineering Discipline.

Bring your AI applications, data-sensitivity requirements and target environment. We will design the observability platform, its dependencies and a validation plan.