Use cases
Self-hosting is designed for organizations with specific requirements:- Data residency and compliance: Meet regulatory or contractual obligations by keeping all customer data (experiment logs, traces, datasets, and prompts) within your own cloud account and region.
- Security posture and isolation: Deploy the data plane behind your firewall or VPN, using your own IAM policies, KMS encryption keys, and audit trails. This ensures sensitive data never traverses external networks.
- Access to private resources: Connect to internal LLM models, proprietary tools, or private APIs that are not accessible from the public internet. The data plane runs within your network and can access resources in your VPC or private network.
How it works
Braintrust’s architecture has two main components:- The data plane stores all sensitive data, including experiment records, logs, traces, spans, datasets, and prompt completions. It consists of the Braintrust API, a PostgreSQL database, Redis cache, object storage, and Brainstore (a high-performance query engine for real-time trace ingestion).
- The control plane provides the web UI, authentication, user management, and metadata storage (project names, experiment names, organization settings). The control plane does not store or process your sensitive data.
Breakdown of where data is stored
Breakdown of where data is stored
Cloud providers
Braintrust provides official Terraform modules for self-hosting on AWS, Google Cloud Platform (GCP), and Azure:- AWS: Terraform with ECS and EC2
- GCP: Terraform with Kubernetes and Helm
- Azure: Terraform with Kubernetes and Helm
Legacy customers: If you previously deployed using AWS CloudFormation, the CloudFormation guide remains available. This deployment method is not supported for new customers.
Non-standard self-hosted
Non-standard self-hosted deployments are customer-operated deployments that cannot use Braintrust’s standard Terraform module and Helm chart pattern as intended, or that require material deviations from the reference architecture. Review it with Braintrust before adopting it. Examples include:- Forking or patching Braintrust Terraform modules or Helm chart templates.
- Replacing standard deployment components with customer-specific infrastructure equivalents.
- Using internal platform tooling that prevents the standard upgrade path from being followed.
- Running with configuration choices that prevent straightforward adoption of future Braintrust releases.
Shared responsibility
When you self-host, uptime becomes a shared responsibility between your team and Braintrust:- Braintrust is responsible for responding quickly when you have issues, collaboratively resolving them with you, and fixing bugs to improve quality.
- Your team is responsible for following the documentation, assigning infrastructure resources on your team, and ensuring that in the event of an incident, you have staff who are familiar with Braintrust and can work with the Braintrust team to share context and resolve issues.
Monitoring
Braintrust monitors your self-hosted deployment through automatic telemetry and an in-app infra dashboard.Telemetry
By default, your self-hosted data plane automatically sends the following telemetry back to the Braintrust-managed control plane:- Health check information
- System metrics (CPU/memory) and Braintrust-specific metrics like indexing lag
- Billing usage telemetry for aggregate usage metrics
Infra dashboard
Only organization owners and members with the Manage settings permission can access this dashboard.
- Processing throughput (bytes processed, compaction)
- CPU and memory usage by reader and writer nodes
- Object storage latency and operations
- Realtime lag
- Status checks
- Query patterns for UI and API queries, grouped by object type, filter fields, source, and predicate types like
ILIKE,match(), and inequalities
Upgrades
Braintrust ships new data plane versions 1-2 times per month. You can find the details of each release on the Self-hosting releases. Braintrust recommends upgrading each time a new version is published. New features often depend on data plane changes, and when they do, Braintrust will automatically gate those features until you upgrade.
To check which data plane version you’re currently running, go to Settings > Data plane.
For upgrade instructions, see Upgrade your deployment.
Remote access
There are occasionally issues that require ad-hoc debugging or running manual commands against containers, the Postgres database, or storage buckets to repair the state of the system. Customers who provide Braintrust with remote access (as needed) have experienced much faster resolutions when such issues occur, because the Braintrust team can connect directly and resolve issues. If this is not possible, factor this into your uptime calculations. If uptime of Braintrust is a key metric for you, strongly consider making remote access available to the Braintrust team as needed. If you cannot set up remote access, ensure that you can swiftly access:- Containers directly (to update them, view logs, restart them, and view host metrics like CPU, network, memory, and disk utilization)
- Postgres to run SQL queries
- Redis to run commands
- Storage buckets to run read, write, and list commands
Hardware requirements
When deploying Braintrust in production, consider these hardware requirements for reliable performance and uptime. These requirements assume typical production usage patterns. For high-utilization deployments, you may need to scale these resources up significantly. Monitor your resource utilization and adjust accordingly.API service
The API service handles all SDK and browser requests to the data plane.This section primarily applies to GCP and Azure with Kubernetes. AWS deployments on ECS are pre-sized appropriately and scale automatically through Application Auto Scaling, but expose optional Terraform variables to tune per-task size and task counts. The defaults are suitable for most deployments. See Configure AWS API ECS services.
Environment variables:
NODE_MEMORY_PERCENT: Set to80-90if the API is running on a dedicated instance or container orchestrator with cgroup memory limits (e.g. Kubernetes, ECS).TS_API_KEEP_ALIVE_TIMEOUT_SECONDS: Configure the HTTP keep-alive timeout when running behind a load balancer. See Configure HTTP keep-alive timeout for details.
PostgreSQL
PostgreSQL stores metadata required to operate the platform, including pointers to raw data in object storage and aggregate statistics about the data. It is not the primary store for your AI data — traces, spans, and logs live in Brainstore and object storage.Redis cache
Redis provides caching and coordination for session management, rate limiting, and Brainstore write ordering.Brainstore
Brainstore is Braintrust’s high-performance database for ingesting and querying AI data. It uses object storage and a streaming Rust engine to load spans in real time, cutting down on latency and enabling fast full-text search over large volumes of trace data. Brainstore runs as separate reader and writer node types, each with distinct resource requirements.Important
- Brainstore requires high-performance storage with at least 150,000 IOPS for both reads and writes. Use NVMe-based ephemeral storage (the storage does not need to be persistent). Do not use EBS volumes or other slower storage options like Azure’s standard local disks, as these will significantly degrade performance.
- For Kubernetes deployments (GCP and Azure), each Brainstore pod must run on its own dedicated node to ensure optimal performance and resource isolation.
Readers
Readers serve ad-hoc queries, including those from the API and user-defined BTQL queries. Plan for a minimum of 2 reader nodes in production to ensure high availability. A specialized reader variant — fast readers — serves predictable UI queries (paginated viewers, span and trace lookups) in isolation from standard reader nodes, keeping the UI responsive while resource-intensive queries run on readers. On GCP and Azure, fast readers are enabled by default with 2 replicas starting in Helm chart v5.0.0. On AWS, fast readers are enabled by default with 2 nodes starting in Terraform module v5.5.0; on earlier module versions they are disabled by default. Setbrainstore_fast_reader_instance_count to 0 to opt out. When planning cluster capacity, account for these additional nodes. See Configure Brainstore fast readers for configuration details.