REFERENCE ARCHITECTURE · ENTERPRISE AI & LLMOPS
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
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.
ARCHITECTURE OVERVIEW
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.
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.
Conceptual pattern. Connectors, licensed capabilities, versions, security policies and topology are validated in a project-specific architecture.
Last reviewed: — · Version scope: —
COMPONENT ROLES
Each component has one clear responsibility. Classifications show whether a component is delivered through a strategic technology partner or independent open-source engineering.
| Component | Classification | Role | Qualification |
|---|---|---|---|
| Langfuse (Web/API + Worker) | Strategic partner | Instrument, trace, evaluate and manage prompt-related workflows | Exact features depend on deployed version and edition |
| ClickHouse | Partner-led or ClickHouse OSS route | Langfuse analytical events and query serving | Do not write custom events directly to Langfuse internal tables |
| PostgreSQL | Independent OSS support | Transactional Langfuse application state | Required in supported self-hosted patterns |
| Redis / compatible | Strategic partner (Redis) | Ingestion queue and application cache | Queue durability, eviction mode and sizing require design |
| MinIO AIStor | Strategic partner | S3-compatible blob assets, raw/multimodal data | Validate object-store config and residency requirements |
| AI runtime / vector retrieval | Customer-owned or separately selected | Application/inference-side model and retrieval choices | Not provided automatically by the Langfuse observability platform |
Links: Langfuse · ClickHouse partner · ClickHouse OSS · PostgreSQL · Redis · MinIO AIStor
We can review sizing, queue configuration and recovery for your current release.
DESIGN TRADEOFFS
There is no single correct deployment. These are the decisions we work through with your team, with the evidence needed to close each one.
| Decision | Options | Choose based on | Validate with |
|---|---|---|---|
| Langfuse hosting model | Self-hosted in customer infrastructure · Vendor-hosted cloud, where applicable | Data residency, telemetry sensitivity, operating capacity, required enterprise features | Data-flow review, edition/feature check, residency sign-off |
| ClickHouse support route | Partner-led ClickHouse · Independently operated ClickHouse OSS | Required commercial assurances, scale, in-house skills | Version compatibility with the selected Langfuse release, ingest load test |
| Langfuse queue/cache | Redis · Redis-compatible service supported by the Langfuse release | Durability needs, HA topology, existing platform standards | Eviction policy set so queued jobs are never evicted; failover test |
| Application semantic cache | None · Separate Redis instance for prompt/retrieval caching | Repeat-query rate, freshness tolerance, data sensitivity of cached responses | Hit-rate and correctness sampling; kept separate from the Langfuse queue |
| Blob storage | MinIO AIStor in customer-controlled infrastructure · Other S3-compatible store | Residency, multimodal volume, lifecycle and retention policies | Langfuse S3 configuration test, bucket policies, lifecycle rules |
| Telemetry content policy | Full capture · Masked capture · Metadata-only for sensitive flows | Privacy obligations, debugging needs, retention cost | Redaction tests on representative prompts; retention job verification |
SECURITY & RESILIENCE
Controls are designed for your environment and obligations. The items below are the conditions we design and test for, not default guarantees.
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.
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.
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.
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.
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.
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
We do not publish generic performance or quality promises. Instead, every engagement measures the pattern against your applications and agreed acceptance criteria.
| Metric | How it is measured | Target |
|---|---|---|
| Trace completeness | Share of production requests and agent steps that produce a complete trace | Agreed per application in the PoC |
| Evaluation quality | Coverage of evaluation scores and datasets for priority use cases; regression detection on prompt or model changes | Agreed with AI product owners |
| Cost visibility | Share of model calls with token usage and cost attributed to application, team or tenant | Agreed per cost-allocation model |
| Ingest headroom | Sustained events per second at peak with acceptable queue depth and worker lag | Derived from forecast peak plus margin |
| Incident recovery | Time to restore observability service and data from backup in a drill | Agreed RPO/RTO per store |
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.
Bring your AI applications, data-sensitivity requirements and target environment. We will design the observability platform, its dependencies and a validation plan.