Delivery Failover

If direct P2P delivery fails, Opsalis automatically falls back to cloud storage or blockchain relay. Your API response always arrives.

Three-Layer Delivery Failover

Consumer London Node node-b.demo.opsalis.com API Owner NYC Server node-a.demo.opsalis.com 1. P2P Direct Fastest — encrypted peer-to-peer 2. BYO-Cloud Relay S3 / MinIO — encrypted storage 3. On-Chain Relay Base Sepolia — immutable delivery fails ↓ fails ↓ P2P: ~50ms Cloud: ~200ms On-Chain: ~3000ms

Three-layer failover: P2P direct (fastest), BYO-cloud relay (encrypted S3/MinIO), on-chain relay (immutable blockchain delivery on Base L2).

Why Delivery Failover Matters

In production systems, network failures happen. Firewalls change, P2P connections drop, servers restart. A single delivery path means a single point of failure — and in an API marketplace where real money settles per call, a lost response means a lost payment and a broken integration.

Opsalis solves this with a three-layer failover chain. The primary path is direct P2P delivery — the fastest option at around 50ms between nodes. If P2P fails (network partition, firewall change, node restart), Opsalis automatically uploads the encrypted response to the consumer's BYO-cloud storage (S3, MinIO, Backblaze). The consumer polls their own bucket and retrieves the response.

If even cloud delivery fails (storage outage, credential rotation), the final fallback is on-chain relay via Base L2 blockchain. The encrypted response is stored as transaction data — immutable, censorship-resistant, and always retrievable. Slower (~3 seconds), but guaranteed to arrive. No API response is ever lost.

Live Demo: Failover Chain Simulation

Failover Scenario

Select which delivery paths to simulate as "failed" and watch the failover chain in action. The demo shows recorded timing from the real NYC ↔ London infrastructure.

Select a failure scenario and click "Simulate Failover" to see the delivery chain in action with real timing data.

Code Samples

# Failover is automatic — you make a normal API call.
# If P2P fails, Opsalis falls back to cloud, then on-chain.

curl -X POST https://opsalis.com/api/demo/api/bb-sse-ticker \
  -H "Content-Type: application/json" \
  -H "X-Consumer-Key: demo-public-key-2026" \
  -d '{
    "action": "getQuote",
    "symbol": "AAPL"
  }'

# Response includes delivery metadata:
# "delivery_method": "p2p" | "cloud-relay" | "onchain-relay"
# "failover_attempts": 1
// Failover is transparent — same API call regardless of delivery path.
// The response metadata tells you which path was used.

const response = await fetch('/api/demo/api/bb-sse-ticker', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Consumer-Key': 'demo-public-key-2026'
  },
  body: JSON.stringify({
    action: 'getQuote',
    symbol: 'AAPL'
  })
});

const result = await response.json();
console.log('Delivery method:', result.delivery_method);
// "p2p" | "cloud-relay" | "onchain-relay"
import requests

response = requests.post(
    "https://opsalis.com/api/demo/api/bb-sse-ticker",
    headers={
        "Content-Type": "application/json",
        "X-Consumer-Key": "demo-public-key-2026",
    },
    json={
        "action": "getQuote",
        "symbol": "AAPL",
    },
)

result = response.json()
print(f"Delivery: {result.get('delivery_method')}")
# "p2p" | "cloud-relay" | "onchain-relay"

Self-Host with Failover

1

Install Opsalis

Pull and run the free Docker container on your own infrastructure.

docker pull opsalis/control-center:latest
docker run -d --name opsalis -p 8080:8080 opsalis/control-center:latest
2

Configure BYO-Cloud Storage (Optional)

Add your S3-compatible storage credentials for the cloud relay fallback. Supports AWS S3, MinIO, Backblaze, and 28+ providers.

# Add cloud storage in Opsalis control center
{
  "delivery": {
    "cloud_relay": {
      "provider": "minio",
      "endpoint": "https://minio.yourserver.com",
      "bucket": "opsalis-responses",
      "access_key": "your-key",
      "secret_key": "your-secret"
    }
  }
}
3

On-Chain Relay (Always Available)

The on-chain relay via Base L2 is always available as the final fallback. No additional configuration needed — it is built into the Opsalis protocol.

4

Failover Is Automatic

Once configured, failover happens transparently. Your consumers make normal API calls and always receive their responses, regardless of which delivery path is used.