For SmithDB resource sizing, see Configure SmithDB for scale.
Summary
The table below provides an overview comparing different LangSmith configurations for various load patterns (reads / writes):The per-replica figures above are resource requests, what the Kubernetes scheduler reserves.
The limits are higher in every case. For the defaults the chart ships, see
Default resource requests and limits.A container that exceeds its memory limit is OOM-killed, and one that exceeds its CPU limit is
throttled. Do not lower either below the shipped default without load-testing the result.
values.yaml snippet for you to start with for your self-hosted LangSmith instance.
Default resource requests and limits
The Helm chart ships these requests and limits for the LangSmith application services. The summary table above covers Postgres, Redis, and ClickHouse, along with the replica counts to run for each load pattern.
Each key nests its resources under
deployment, so the backend’s requests are at
backend.deployment.resources.requests. playground is the one service whose memory limit
sits far above its request, 8Gi against 1Gi, so size the nodes it schedules onto for the
limit. To confirm the defaults for your chart version, run
helm show values langchain/langsmith.
Default autoscaling ranges
Autoscaling is disabled by default on every service in the table below. Each one ships two blocks with the same replica range:autoscaling.hpa, for a Kubernetes
HorizontalPodAutoscaler (HPA), and autoscaling.keda, for
KEDA (Kubernetes Event-driven Autoscaling). Enable one or the other, not
both.
The HPA keys are
minReplicas and maxReplicas; the KEDA equivalents are minReplicaCount
and maxReplicaCount. operator has no autoscaling block and always runs at its configured
replica count. For the queue services, prefer KEDA, which scales on queue backlog rather than
on CPU and memory alone. For more information, see
KEDA autoscaling for LangSmith queues.
Set maxReplicas at or above the replica count for your load pattern, and minReplicas to
the steady-state count you want to hold. The
example configurations give both a fixed
replica count and a commented autoscaling range for each service.
Trace ingestion (write path)
Common usage that put load on the write path:- Ingesting traces via the Python or JavaScript LangSmith SDK
- Ingesting traces via the
@traceablewrapper - Submitting traces via the
/runs/multipartendpoint
- Platform backend service: Receives initial request to ingest traces and places traces on a Redis queue
- Redis cache: Used to queue traces that need to be persisted
- Ingest queue service: Persists traces from the Redis queue to each enabled trace store, ClickHouse, SmithDB, or both
- ClickHouse: Persistent storage used for traces
- SmithDB ingestion service: Receives traces from the ingest queue service and writes them to object storage. Runs only when SmithDB ingestion is enabled. In unified mode, the single SmithDB pod handles ingestion.
- Give ClickHouse more resources (CPU and memory) if it is approaching resource limits.
- If SmithDB ingestion is enabled, size the SmithDB ingestion service for your write load. See Configure SmithDB for scale.
- Increase the number of platform-backend pods if ingest requests are taking long to respond.
- Increase ingest queue service pod replicas if traces are not being processed from Redis fast enough.
- Use a larger Redis cache if you notice that the current Redis instance is reaching resource limits. This could also be a reason why ingest requests take a long time.
Partition the ingestion queue
By default, all traces wait in one Redis queue namedingestion. On a Redis Cluster, that queue lives on a single shard, which can limit ingestion throughput. Partitioning splits the queue across shards.
Partitioning brings no benefit on a single-shard Redis deployment. It is a load-spreading measure that is only effective with a Redis Cluster.
1:
GO_INGESTION_QUEUE_PARTITIONS: the number of partitions that services spread new traces across.GO_INGESTION_WORKER_PARTITIONS: the number of partitions that ingest queue workers read from.
commonEnv:
ingestion queue. With more, in LangSmith v0.18.0 and later, they use ingestion-0 to ingestion-3, then ingestion-fur-4, ingestion-qg-5, and so on. Workers also keep reading ingestion, so tasks queued before you partitioned still drain.
LangSmith supports up to 250 partitions, but you are unlikely to need that many. As a starting point, move to 4 partitions when ingestion approaches 10,000 runs per second and your Redis Cluster has 4 or more shards.
Change the variables in order, because tasks in a partition that no worker reads are never processed:
- To add partitions: raise
GO_INGESTION_WORKER_PARTITIONSand deploy, then raiseGO_INGESTION_QUEUE_PARTITIONSto the same value and deploy. - To remove partitions: lower
GO_INGESTION_QUEUE_PARTITIONSand deploy. Wait until the removed partitions have no pending, active, retry, or scheduled tasks, then lowerGO_INGESTION_WORKER_PARTITIONS.
redis-cli, and -c on Redis Cluster. The example checks the partitions removed when going from 6 to 4:
0 for every removed partition.
To check partitioning, read the asynq worker queue configuration log line that a queue worker writes at startup. It lists the queues the worker reads.
Trace querying (read path)
Common usage that puts load on the read path:- Users on the frontend looking at agent environments or individual traces
- Scripts used to query for trace info
- Hitting either the
/runs/queryor/runs/<run-id>api endpoints
- Backend service: Receives the request and submits a query to ClickHouse to then respond to the request
- ClickHouse: Persistent storage for traces. This is the main database that is queried when requesting trace info.
- Increase the number of backend service pods. This would be most impactful if backend service pods are reaching 1 core CPU usage.
- Give ClickHouse more resources (CPU or Memory). ClickHouse can be very resource intensive, but it should lead to better performance.
- Move to a replicated ClickHouse cluster. Adding replicas of ClickHouse helps with read performance, but we recommend staying below 5 replicas (start with 3).
KEDA autoscaling for LangSmith queues
Available in LangSmith v0.13.0 and later.
queue and ingest-queue services to scale automatically based on their queue backlog size, as well as CPU and memory. This results in more efficient resource utilization and better handling of traffic spikes.
Install KEDA
Configure KEDA autoscaling
Once KEDA is installed, you can enable KEDA-based autoscaling for thequeue and ingest-queue services in your values.yaml:
You can also enable KEDA for other services (
backend, platformBackend, etc) but they will still only scale with CPU and memory.Example LangSmith configurations for scale
Below we provide some example LangSmith configurations based on expected read and write loads. For read load (trace querying):- Low means roughly 5 users looking at traces at a time (about 10 requests per second)
- Medium means roughly 20 users looking at traces at a time (about 40 requests per second)
- High means roughly 50 users looking at traces at a time (about 100 requests per second)
- Low means up to 10 runs submitted per second
- Medium means up to 100 runs submitted per second
- High means up to 1,000 runs submitted per second
- Very high means up to 10,000 runs submitted per second
The exact optimal configuration depends on your usage and trace payloads. Use the examples below in combination with the information above and your specific usage to update your LangSmith configuration as you see fit. If you have any questions, please reach out to the LangChain team.
Low reads, low writes
The default LangSmith configuration will handle this load. No custom resource configuration is needed here.Low reads, high writes
You have a very high scale of trace ingestions, but single digit number of users on the frontend querying traces at any one time. For this, we recommend a configuration like this:High reads, low writes
You have a relatively low scale of trace ingestions, but many frontend users querying traces and/or have scripts that hit the/runs/query or /runs/<run-id> endpoints frequently.
For this, we strongly recommend setting up a replicated ClickHouse cluster to enable high read scale at low latency. See our external ClickHouse doc for more guidance on how to setup a replicated ClickHouse cluster. For this load pattern, we recommend using a 3 node replicated setup, where each replica in the cluster should have resource requests of 8+ cores and 16+ GB memory, and resource limit of 12 cores and 32 GB memory.
For this, we recommend a configuration like this:
Medium reads, medium writes
This is a good all around configuration that should be able to handle most usage patterns of LangSmith. In internal testing, this configuration allowed us to scale to 100 runs ingested per second and 40 read requests per second. For this, we recommend a configuration like this:High reads, high writes
You have a very high rate of trace ingestion (approaching 1,000 runs submitted per second) and also have many users querying traces on the frontend (over 50 users) and/or scripts that are consistently making requests to/runs/query or /runs/<run-id> endpoints.
For this, we very strongly recommend setting up a replicated ClickHouse cluster to prevent degraded read performance at high write scale. See our external ClickHouse doc for more guidance on how to set up a replicated ClickHouse cluster. For this load pattern, we recommend using a 3 node replicated setup, where each replica in the cluster should have resource requests of 14+ cores and 24+ GB memory, and resource limit of 20 cores and 48 GB memory. We also recommend that each node/instance of ClickHouse has 600 Gi of volume storage for each day of TTL that you enable (as per the configuration below).
Overall, we recommend a configuration like this:
High reads, very high writes
This configuration requires Helm chart version 0.18.0 or later, with SmithDB as the only trace store.
/runs/query or /runs/<run-id> endpoints.
This configuration uses SmithDB as the only trace store. For a new installation, set it up without ClickHouse (clickhouse.enabled: false). On an existing installation, do not disable ClickHouse: that loses its data. Move to SmithDB with Install LangSmith with SmithDB, which runs SmithDB alongside ClickHouse and then switches queries to it, and migrate ClickHouse history if you need it. Retiring ClickHouse afterwards is a separate procedure; contact LangChain through the Support Portal first. Size SmithDB with the Large tier in Configure SmithDB for scale. Run Redis as an external Redis cluster with 4 shards, and partition the ingestion queue into 4 partitions.
Treat the replica counts below as a minimum. The example sets redisRunsExpirySeconds to 7200 (2 hours; the chart default is 6 hours). A shorter value lowers the memory Redis needs, but it also limits how long a single run can last. Monitor queue latency and alert well before it reaches this value.
Use a configuration like this:
Ensure that the Kubernetes cluster is configured with sufficient resources to scale to the recommended size. After deployment, all of the pods in the Kubernetes cluster should be in a
Running state. Pods stuck in Pending may indicate that you are reaching node pool limits or need larger nodes.Also, ensure that any ingress controller deployed on the cluster is able to handle the desired load to prevent bottlenecks.Connect these docs to your agent of choice via MCP for real-time answers.

