The Four-Stage Evolution of a 500TB Quantitative Data Platform

    This article walks through the four-stage evolution of a 500TB+ quantitative research data platform, from local NVMe/SSD storage to a three-tier architecture built on local caching, a POSIX-compatible file layer, and elastic object storage. It explains the infrastructure bottlenecks behind each decision, the trade-offs of local disks, object storage semantics, metadata and data decoupling, cache granularity, prefetching, hit-ratio observability, and consistency conventions, and closes with a reusable checklist covering hot-cold separation, versioned directories, small-file governance, end-to-end observability, and capacity planning.

    1. Background: Where the Infrastructure Bottleneck Sits in Quantitative Research

    Quantitative research is an engineering discipline that depends heavily on data throughput. Unlike conventional business systems, its workloads have a few distinct characteristics:

    • Large and continuously growing data volumes: Minute-level and tick-level market data, combined with multi-period factors, can add terabytes in a single day, pushing the total quickly into the hundreds of terabytes.
    • Highly random access patterns: Factor backtesting repeatedly slices data along both the time and instrument dimensions, so random reads far outnumber sequential reads.
    • Iteration speed determines competitiveness: Every idea a researcher validates travels the full chain of data loading, feature computation, and backtest evaluation. IO wait at any single step is amplified into end-to-end iteration latency.
    • Strong dependence on file semantics: A large body of existing research code is built on file paths, directory traversal, and random-offset reads and writes, which makes migration expensive.

    An AI-driven trading team ran into exactly these constraints while building its research infrastructure. With more than 500TB of data, it started from a local-disk design and went through four stages of evolution, ending up with a three-in-one architecture centered on cache acceleration, elastic object storage, and POSIX compatibility. The sections below review the decision logic and engineering details stage by stage.

    2. Stage One: Starting With Local Disks — Fast, but Hard to Share

    Design: Single machines or a small number of worker nodes mounting local NVMe/SSD, with research jobs reading and writing the local filesystem directly.

    Advantages: Lowest latency, complete POSIX semantics, and existing code runs with zero modification.

    Problems that surfaced:

    1. A clear capacity ceiling; scaling out requires downtime and data migration.
    2. Data replicas scattered across nodes, creating a governance problem where the same market data exists in several places with inconsistent versions.
    3. A node failure makes its data unavailable, with no redundancy.
    4. Long data warm-up periods whenever a new researcher joins or a compute node is added.

    Conclusion: Local disks work well as a “hot data layer” on the compute side, but not as the sole data source.

    3. Stage Two: Adding Elastic Object Storage — Solving Capacity and Reliability

    Design: Move the full history of market data and factors into object storage as the single source of truth.

    Benefits: Near-unlimited capacity, elastic pay-as-you-go scaling, built-in multi-replica and durability guarantees, and a cost structure that shifts from prepaid purchase to on-demand payment.

    New conflicts introduced:

    • Object storage accesses data in units of objects and lacks POSIX semantics such as directory hierarchy, atomic rename, file locking, and random writes.
    • Under high-concurrency small-file reads, request counts and protocol overhead become the new bottleneck.
    • Research code needs modification, which creates migration resistance.

    Conclusion: Object storage solved “can we store it” and “can we avoid losing it,” but not “does it run fast” or “is it easy to change.”

    4. Stage Three: Layering a POSIX-Compatible Layer — Smoothing Migration for Legacy Code

    Design: Introduce a filesystem layer with a POSIX interface on top of object storage, translating object semantics into file semantics and managing metadata separately from data.

    Key design points:

    • Decoupling metadata from data: The directory tree, permissions, timestamps, and other metadata are maintained independently, so every stat does not have to go back to object storage.
    • Filling semantic gaps: Support for common calls such as open/read/write/rename/lock, covering the vast majority of how research code is written.
    • Transparent mounting: Compute nodes attach through a standard mount, so business code barely changes.

    An illustrative mount and directory layout (pseudocode, conveying the idea only):

    1. # Mount an object storage bucket as a research data directory under a unified namespace
    2. mount -t posixfs bucket://quant-research /mnt/research
    3. # Typical research directory tiers
    4. # /mnt/research/raw/tick/2025/ # raw market data, cold
    5. # /mnt/research/factor/daily/ # factors, warm
    6. # /mnt/research/work/<user>/cache/ # intermediate compute artifacts, hot

    Remaining problem: Every cross-network read back to the source still costs anywhere from milliseconds to tens of milliseconds, and read amplification for high-frequency backtesting remains pronounced.

    5. Stage Four: Adding Local Cache and Tiering — The Three-in-One Architecture Takes Shape

    Design: Add a local cache above the POSIX layer, forming a three-tier hierarchy of “local cache — POSIX file layer — object storage.”

    Division of responsibilities across tiers:

    Tier Content Access pattern Eviction policy
    Local cache Same-day market data, frequently used factors, intermediate results High-frequency random reads and writes LRU/LFU, triggered by capacity watermarks
    POSIX file layer Metadata plus the full namespace Directory traversal, path addressing Metadata stays resident
    Object storage Full historical data Low-frequency sequential reads Lifecycle archiving

    Engineering essentials:

    1. Cache granularity: Combine whole-file caching with chunked caching at file granularity, avoiding full retrieval of large files that causes bandwidth jitter.
    2. Prefetching and parallelism: Enable sequential prefetch for the common “scan by date order” backtest pattern, and control concurrency for parallel reads across multiple instruments so the network is not saturated.
    3. Observable hit ratio: Monitor three core metrics — cache hit ratio, origin QPS, and average time to first byte — as the basis for tuning capacity and warm-up.
    4. Warm-up mechanism: Prefetch ahead of scheduling based on the day’s instrument list, moving the wait from “inside the job” to “before the job.”
    5. Consistency conventions: Keep raw market data read-only and immutable; write factors into a new versioned directory and switch atomically, avoiding inconsistency between cache and source.

    An illustrative cache policy configuration (pseudocode):

    1. cache:
    2. capacity: 30TB
    3. eviction: lru
    4. prefetch:
    5. pattern: sequential
    6. window: 256MB
    7. concurrency:
    8. max_inflight: 64
    9. metrics:
    10. - cache_hit_ratio
    11. - origin_qps
    12. - ttfb_ms

    6. Reviewing the Decision Logic Across the Four Stages

    • Do not do everything at once: Solve “do we have it” first, then “is it fast,” and finally “is it smooth,” keeping a rollback path at every step.
    • Put the single source of truth in elastic object storage: The optimal answer for reliability and cost is object storage, not piles of local disks.
    • POSIX compatibility is the key variable in migration cost: How complete the file semantics are directly determines how much research code must be rewritten.
    • Caching is the only controllable, deterministic acceleration lever: Turning random reads into local hits through hit ratio and prefetching is the highest-payoff optimization in quantitative scenarios.

    7. A Portable Best-Practice Checklist

    1. Hot-cold separation: keep raw data read-only and archived, retain intermediate artifacts locally, and let them sink automatically by lifecycle policy.
    2. Versioned directories: replace in-place overwrite with immutable directories plus atomic switching.
    3. Small-file governance: merge small files on a schedule to reduce metadata and request overhead.
    4. End-to-end observability: correlate storage metrics with backtest job duration to locate the real bottleneck.
    5. Capacity planning up front: estimate with “daily increment × retention period × replica factor” and leave room for the cache watermark.
    6. With general-purpose capabilities from cloud providers such as Baidu AI Cloud, a similar architecture can be assembled from common building blocks like “object storage + container platform + monitoring and alerting”; the actual selection should follow your own semantic requirements and access patterns.

    8. Closing Thoughts

    The evolution of a 500TB-scale quantitative data platform is essentially a three-way balance among semantics, performance, and cost. Local disks establish the performance baseline, object storage sets the floor for capacity and reliability, the POSIX-compatible layer smooths migration friction, and cache tiering compresses uncertain latency into an acceptable range. This path depends on no specific product; any environment with object storage and the ability to adapt file semantics can reuse it, and the core methodology applies equally to market data, factors, and even alternative data scenarios.