← All Features
Infrastructure

Graceful Degradation

Redis down? SMTP failing? IUSign keeps working.

Most platforms have single points of failure — if Redis crashes, the whole system goes down. IUSign is designed to degrade gracefully.

How It Works

  1. 1

    If Redis is unavailable, API keys are looked up directly from the database (slower but functional).

  2. 2

    Idempotency checks fall back to database-based deduplication when Redis cache is down.

  3. 3

    Rate limiting degrades to in-memory counters (per-process, not cluster-wide) when Redis is unavailable.

  4. 4

    Email delivery switches from async queue to synchronous send with retry logic.

  5. 5

    Telemetry collection stops gracefully — no error loops, no log spam.

Technical Details

Every Redis call is wrapped in a try/except with a redis_connected flag check.

API key lookup: Redis GET → fallback to SELECT * FROM api_keys WHERE hashed_key = ?

Idempotency: Redis SETNX → fallback to INSERT OR IGNORE INTO idempotency_keys.

Rate limiting: Redis INCR → fallback to in-memory collections.Counter (per-process).

Dependency Hierarchy

SQLite is the ONLY hard dependency — without it, nothing works. Redis, SMTP, and LibreOffice are soft dependencies — the system degrades gracefully when they're unavailable.

Redis Fallback Paths

API Key Lookup: Redis cache (5ms) → DB query (15ms). Idempotency: Redis SETNX (1ms) → DB INSERT (5ms). Rate Limiting: Redis INCR (1ms) → In-memory counter (0ms).

Ready to see it in action?

Create your free account and send your first document in under 3 minutes.

Get Started Free