Learn how to optimize the performance of the TensorZero Gateway for lower latency and higher throughput.
gateway.observability.async_writes orgateway.observability.batch_writes.With either of these settings, the gateway will return the response to the client immediately and asynchronously insert data into ClickHouse.The former will immediately insert each row individually, while the latter will batch multiple rows together for more efficient writes.As a rule of thumb, consider the following decision matrix:| High throughput | Low throughput | |
|---|---|---|
| Latency is critical | batch_writes | async_writes |
| Latency is not critical | batch_writes | Default strategy |