Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1019 Bytes

File metadata and controls

27 lines (19 loc) · 1019 Bytes

Hedged Object Store

Crates.io

This crate extends the object-store to include request hedging for read requests.

Hedging is a common technique for reducing tail latencies in distributed systems, as explored in papers such as The Tail at Scale and AnyBlob.

Usage

use object_store::{ObjectStore, path::Path};
use object_store_hedging::{HedgedStore, HedgingConfig};

// Wrap any ObjectStore with hedging
let store = object_store::aws::AmazonS3Builder::from_env()
    .with_bucket_name("my-bucket")
    .build()?;
let store = HedgedStore::new(store, HedgingConfig::default());

// Use as normal - hedging happens automatically on reads
let data = store.get(&Path::from("my-key")).await?;