Lakehouse Real-Time at CERC: Latency and the Shared Warehouse Hypothesis
TL;DR
- We tested APIs querying governed data in Lakehouse Real-Time, without an application-managed replicated serving layer.
- SQL execution inside the warehouse ranged from 30 to 100 ms. Total latency observed by the client had a p50 of 328.5 ms and a p95 of 411.4 ms.
- Only one or two services currently use the solution. The hypothesis is to share one warehouse across services, but this still needs testing.
- The next test must measure p95/p99, concurrency, queues, errors, throughput, and total cost, including always-on capacity and cold start.
Why does CERC explore new technologies?
CERC operates critical infrastructure for the receivables market. This work requires reliable systems, governed data, and responsible technical decisions.
It also requires looking ahead. CERC maintains an engineering culture that investigates technologies that can simplify architectures, reduce repeated operations, and improve the experience of people using our products.
CERC’s data environment exceeds 10 PB. At this scale, every replication, cache, or serving layer adds cost and operational responsibility. We test alternatives before deciding where to invest.
This article reports an exploration of Databricks Lakehouse Real-Time. The technology is emerging. The goal is not to announce adoption, but to share what we measured, learned, and still need to validate.
The interesting question is not only “does it work?”
Lakehouse Real-Time enables operational queries over lakehouse data. The opportunity is to let services query governed tables in Unity Catalog.
This can help teams avoid operating another data layer. It does not mean an intermediary copy is never needed. It means testing when a governed source can serve different APIs and workloads.
The real case is still small: one or two services use the solution. Broad adoption has not been validated. The strategic question is whether services with different filters, selectivity, complexity, and concurrency can share capacity with acceptable cost and latency.
What we measured
We distinguished two measurements:
- SQL execution inside the warehouse: between 30 and 100 ms, excluding the network path to the application.
- Total time observed by the client: the timer starts immediately before the HTTP client sends the request and ends when the complete HTTP response body is received. It includes waiting for a pooled connection, DNS, TCP/TLS connection setup when needed, communication with Databricks, query execution, and result transfer. It excludes JSON deserialization, business processing, and the rest of the user request. Because the HTTP client is shared, DNS and connection setup are usually not repeated when a persistent connection is available.
The table shows the second measurement:
The English table uses a period for decimal values and a comma for thousands.
| Percentile or metric | Latency |
|---|---|
| Minimum | 221.8 ms |
| p50 | 328.5 ms |
| Average | 332.7 ms |
| p75 | 360.0 ms |
| p90 | 390.7 ms |
| p95 | 411.4 ms |
| p99 | 449.2 ms |
| p99.9 | 847.9 ms |
| Maximum | 1,214.6 ms |
| Standard deviation | 49.2 ms |
This distinction matters: 30–100 ms of SQL execution does not mean 30–100 ms for the application. Client-observed time may also include network, API waiting, and result transfer.
We cannot attribute the entire difference to the network. To separate each part, we need to correlate client and warehouse measurements per query.
To make the result reproducible, the next report should document:
- Request count and test duration.
- Concurrency and throughput.
- Cache and warehouse state.
- Table and result sizes.
- Filters, query complexity, and sizing.
How the integration works
The service uses cloud identity, without distributing static credentials. It calls the Statement Execution API over HTTP/JSON.
The token is reused in memory and renewed when needed. Execution can wait for an inline response or query the status later when the query exceeds the timeout.
POST https://{databricks-workspace}/api/2.0/sql/statements
{
"statement": "SELECT * FROM catalog.schema.table WHERE id = :param_id",
"warehouse_id": "<warehouse_id>",
"parameters": [
{"name": "param_id", "value": "value_here", "type": "STRING"}
],
"wait_timeout": "10s",
"disposition": "INLINE",
"format": "JSON_ARRAY"
}
The current implementation:
- Uses a shared HTTP client to reuse connections and Keep-Alive.
- Caches the token with early renewal.
- Prevents simultaneous token renewals.
- Uses parameterized SQL instead of direct value interpolation.
- Polls asynchronously when a query exceeds the timeout.
- Processes the JSON result before it reaches business code.
The HTTP library and JSON handling are implementation details of this CERC connector. Other teams may use different libraries or languages; the HTTP/JSON API pattern and the need to measure the complete path remain the same.
Governance and access requirements
This integration required alignment with the data platform. The main points are:
- Tables queried directly must be managed by Unity Catalog.
- External tables are not supported by Lakehouse Real-Time.
- Filters, selectivity, layout, and scanned volume must be evaluated per workload.
- Liquid clustering and predictive optimization are recommendations for appropriate scenarios, not universal requirements.
- Historical or large tables are not automatically ineligible. Performance must be measured for the concrete query.
- The service identity must receive only the required permissions. For example, it may receive
SELECTonly on specific Unity Catalog tables andUSAGEon the warehouse used by the integration.
This follows Databricks’ permission model. See the official documentation on permissions and access control.
The missing test: multiple services on one warehouse
Sharing capacity could spread the cost of an always-on warehouse across services. However, different workloads may compete for resources.
A low-selectivity or complex query can increase queues and degrade another service’s p95. Capacity may need to grow, or workloads may need to be separated. That would reduce the expected savings.
The next experiment should use representative queries, first under controlled concurrency and then under mixed load. For each service, we need to record:
- p50, p95, p99, and p99.9.
- Cold start, queue, execution, and transport when possible.
- Errors, timeouts, throughput, and result size.
- Selectivity, complexity, scanned data, and workload interference.
- DBU, always-on capacity, scale, and alternative costs.
- Isolation and fallback policies.
The test should compare the same need with replication, caching, and other serving options. We should not assume that one alternative is cheaper.
Conclusion
The experiment shows a concrete possibility: APIs can query governed data directly in the lakehouse. The team still needs to validate whether this reduces replication and caching layers maintained by applications.
Current results do not demonstrate savings, SLO compliance under multi-service load, or an advantage over alternatives. The shared warehouse hypothesis must answer those questions.
For CERC, exploring advanced technologies is part of engineering work. Responsible exploration requires measuring, comparing, and recognizing limits before operating at scale.
This is a promising experiment, not a production decision. The next step is continuous validation, with complete metrics, known costs, and clear criteria for security, reliability, and compliance.
Note: these numbers describe this experiment. They are not a performance guarantee for other workloads.