1. Problem Statement
For a long time, while operating RFC 6962 CT log servers, we have faced severe performance challenges with the usage patterns of the get-entries endpoint:
Low Cache Hit Rate: Due to the randomness and uncertainty of the start and end parameters, the cache hit rate at both the CDN and gateway levels is extremely low, preventing the cache from delivering its acceleration benefits.
Huge Backend Pressure: Every request requires a range query in the backend database and real-time data compression. This not only causes a high database I/O load but also significantly increases the Gzip processing overhead on the gateway.
Inefficient Bandwidth Utilization: Frequent data requests from certain monitors result in excessively high network transmission bandwidth consumption, exhibiting a long-tail effect.
Retrieval Latency Degrades with Data Growth: As the scale of CT logs continues to expand, the retrieval latency for monitors keeps climbing, which adversely affects the real-time availability of monitor data.
2. Solution Strategy
Given that the Static CT API has been recognized within the CT community and mainstream monitor tools have already supported this format, we have decided to deploy a set of data acquisition interfaces that comply with the Static CT API standard .
Core Logic: Leverage the static, immutable, and pre-cacheable characteristics of Tile data to alleviate backend database query pressure and network bandwidth bottlenecks through CDN caching.
3. Implementation
Deploy an HTTP service specifically dedicated to serving Tile-formatted data.
3.1 Architectural Design
Interface Design:
/tile/data/<N>: Provides standard Tile block data.
/issuer/<SHA256>: Provides CA issuer information.
Interfaces and data formats:
https://github.com/C2SP/C2SP/blob/main/static-ct-api.md#log-entries https://github.com/C2SP/C2SP/blob/main/static-ct-api.md#issuers Among these, the /tile/data interface only supports the format of /tile/data/<N> (i.e., full tiles) and does not support the [.p/<W>] parameter (partial tiles).
Data Flow:
Data Acquisition: The HTTP service communicates with the trillian_log_server via the gRPC protocol to retrieve raw data segments.
Format Reassembly: The service repackages the JSON data retrieved via gRPC from the RFC 6962 format into the Tile format.
Caching and Distribution: The packaged Tile data is distributed and cached by CDN nodes.
3.2 Verification Mechanism
After a monitor retrieves the Tile data, the processing workflow is as follows:
Parsing: Parse the Tile data packets according to the Static CT API format.
Auditing and Verification: Monitors must independently compute the Merkle Tree Leaf Hashes based on the RFC 6962 specification to ensure the consistency proofs and audit.
4. Expected Benefits
Community Benefits: Monitors can sync full/incremental data much faster, meeting the demands of continuously growing log scales in the future.
Performance Improvement: With CDN caching, data retrieval latency will be dramatically reduced from "database processing time + transmission time + bandwidth congestion" down to "CDN edge response time".
Efficiency Gains:
Lowers database I/O utilization for the operator.
Enhances overall service stability.