How It Works

On every write, HyperDrive:

  1. Writes to the primary provider.
  2. Asynchronously replicates to all backup providers in the configured list.
  3. Tracks success/failure per provider and updates health scores.

On every read, HyperDrive:

  1. Attempts the primary provider.
  2. If it fails or is below the health threshold, falls over to the next backup provider.
  3. Returns the result from whichever provider first responds successfully.

Configuration

json — OASISDNA.json
{
  "OASISDNA": {
    "DefaultProviderType":        "MongoDBOASIS",
    "BackupProviderTypes":        [ "SQLiteOASIS", "HoloOASIS" ],
    "AutoFailoverEnabled":        true,
    "AutoReplicationEnabled":     true,
    "AutoLoadBalanceEnabled":     false,
    "ProviderHealthCheckInterval": 30,   // seconds
    "ProviderHealthThreshold":     0.7   // 0–1; below this, provider is bypassed
  }
}

Provider Health Scores

HyperDrive maintains a rolling health score (0.0–1.0) for each provider based on recent operation success rates. A provider below ProviderHealthThreshold is automatically bypassed for reads until it recovers.

Query health scores at runtime via the API:

GET/hyperdrive/GetProviderHealth

Manual Replication

Trigger a one-off replication from the primary to a specific backup provider:

POST/hyperdrive/ReplicateToProvider

Body: { "targetProviderType": "HoloOASIS" }

Useful after adding a new provider to backfill its data store from the primary.

Load Balancing

When AutoLoadBalanceEnabled is true, HyperDrive distributes reads across all healthy providers using a weighted round-robin, weighted by health score. Suitable for read-heavy deployments with multiple fast providers.

⚠️
Eventual consistency

Async replication means backup providers may be briefly behind the primary after a write. For reads that must see the latest write immediately, either disable async replication (set synchronous mode) or always read from the primary by passing providerType explicitly.