Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Resilience & Stable Microservices

Building Resilience & Stable Microservices

🔗 Relevant Links & Resources:

🎥 Watch Recording: YouTube

💻 Code & Architecture: GitHub

🌐 Personal Website: pelinsarihan.com

💼 Connect on LinkedIn: LinkedIn

Pelin Sarıhan

November 01, 2026

Transcript

14 slides
  1. Content • Introduction • Stability • Why is it needed?

    • Stability Antipatterns • Stability Patterns • Hystrix, Resilience4J
  2. Stability • Stability ≠ Correctness • Resilient System • Boundaries

    & Isolation • Failures are inevitable, containment is key! • Stability is about keeping failures contained within boundaries
  3. Why is it needed? • Microservices -> too many integration

    points • Failures propagate if not controlled • Product = unpredictable environment • User experience = system stability • Failure is normal, recover is critical!
  4. Stability Antipatterns • Chain Reactions • Cascading Failures • Blocked

    Threads • Attacks of Self Denial • SLA Inversion • Scaling Effects
  5. Retry • Handles transient failures • Retries failed calls after

    a short wait duration • Defines max attempts to prevent infinite retries • Uses Exponential Backoff and Jitter to avoid Retry Storms • Enables self-healing by giving the system time to recover • Requires idempotent operations for safe re-execution • Work closely with Timeout, Circuit Breaker • Core principle: • “Retry for transient failures, not for persistent ones.”
  6. Timeout • Limits max wait time for each request or

    operation • Enables cancellation and releases blocked threads • Provides latency control and keeps system responsive • Must balance duration: • Too short → false failures • Too long → slow system • Works closely with Retry, Circuit Breaker • Core principle: • “Fail Fast is better than Fail Late.”
  7. Rate Limiter • Controls request rate to protect backend capacity

    • Ensures fair usage and predictable performance • Common algorithms: • Token Bucket • Leaking Bucket • Fixed Window • Sliding Window • Integrates with Circuit Breaker for overload handling • Can reject legitimate requests when limits are reached • Core principle: • “Better to reject a few requests than to crash everything.”
  8. Bulkhead • Provides isolation between components or workloads • Uses

    thread pool segregation to prevent cross-impact • Applies resource partitioning for shared dependencies • Enables parallel workloads without mutual interference • Useful in shared-resource environments • Prevents domino effects and cascading failures • Trade-offs: possible resource fragmentation, higher configuration complexity • Core principle: • “A flooded compartment should not sink the whole ship.”
  9. Circuit Breaker • Acts as a protective switch to stop

    cascading failures • Operates in three states: • Closed • Open • Half-Open • Implements fail-fast, rejects calls instantly when open • Supports fallback for graceful degradation • Prevents system overload and allows self-healing • Core principle: • “Better to trip early than to crash entirely.”
  10. Q&A

More Decks by Pelin Sarıhan

Other Decks in Technology