stability-patterns-knowledge

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Stability Patterns Knowledge Base

稳定性模式知识库

Quick reference for resilience and fault tolerance patterns in PHP applications.
PHP应用中弹性与容错模式的速查参考。

Core Patterns Overview

核心模式概述

┌─────────────────────────────────────────────────────────────────────────────┐
│                        STABILITY PATTERNS                                    │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   ┌────────────────────────────────────────────────────────────────────┐    │
│   │                      REQUEST FLOW                                   │    │
│   │                                                                     │    │
│   │   Client  ──▶  Rate Limiter  ──▶  Circuit Breaker  ──▶  Service   │    │
│   │      │              │                   │                  │        │    │
│   │      │         Throttle            Monitor State       Actual      │    │
│   │      │         requests            Open/Closed         work        │    │
│   │      │              │                   │                  │        │    │
│   │      │              ▼                   ▼                  ▼        │    │
│   │      │         ┌────────┐          ┌────────┐         ┌────────┐   │    │
│   │      │         │Bulkhead│          │ Retry  │         │Timeout │   │    │
│   │      │         │Isolate │          │Pattern │         │Control │   │    │
│   │      │         └────────┘          └────────┘         └────────┘   │    │
│   └────────────────────────────────────────────────────────────────────┘    │
│                                                                              │
├─────────────────────────────────────────────────────────────────────────────┤
│   Pattern          │ Purpose                    │ Protects Against           │
│   ─────────────────┼────────────────────────────┼─────────────────────────── │
│   Rate Limiter     │ Throttle request rate      │ DDoS, overload, abuse     │
│   Circuit Breaker  │ Fail fast on failures      │ Cascading failures        │
│   Retry            │ Retry transient failures   │ Temporary outages         │
│   Bulkhead         │ Isolate resources          │ Resource exhaustion       │
│   Timeout          │ Limit wait time            │ Slow dependencies         │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│                        STABILITY PATTERNS                                    │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   ┌────────────────────────────────────────────────────────────────────┐    │
│   │                      REQUEST FLOW                                   │    │
│   │                                                                     │    │
│   │   Client  ──▶  Rate Limiter  ──▶  Circuit Breaker  ──▶  Service   │    │
│   │      │              │                   │                  │        │    │
│   │      │         Throttle            Monitor State       Actual      │    │
│   │      │         requests            Open/Closed         work        │    │
│   │      │              │                   │                  │        │    │
│   │      │              ▼                   ▼                  ▼        │    │
│   │      │         ┌────────┐          ┌────────┐         ┌────────┐   │    │
│   │      │         │Bulkhead│          │ Retry  │         │Timeout │   │    │
│   │      │         │Isolate │          │Pattern │         │Control │   │    │
│   │      │         └────────┘          └────────┘         └────────┘   │    │
│   └────────────────────────────────────────────────────────────────────┘    │
│                                                                              │
├─────────────────────────────────────────────────────────────────────────────┤
│   模式          │ 用途                    │ 防护场景                     │
│   ─────────────────┼────────────────────────────┼─────────────────────────── │
│   Rate Limiter     │ 限制请求速率            │ DDoS攻击、过载、滥用        │
│   Circuit Breaker  │ 故障时快速失败          │ 级联故障                    │
│   Retry            │ 重试瞬时故障            │ 临时服务中断                │
│   Bulkhead         │ 隔离资源                │ 资源耗尽                    │
│   Timeout          │ 限制等待时间            │ 依赖服务响应缓慢            │
└─────────────────────────────────────────────────────────────────────────────┘

Pattern Relationships

模式关联关系

┌─────────────────────────────────────────────────────────────────────────────┐
│                    PATTERN INTERACTION                                       │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│                         ┌────────────────────┐                               │
│                         │   Rate Limiter     │                               │
│                         │  (Entry Point)     │                               │
│                         └─────────┬──────────┘                               │
│                                   │                                          │
│                                   ▼                                          │
│                         ┌────────────────────┐                               │
│                         │     Bulkhead       │                               │
│                         │ (Resource Limits)  │                               │
│                         └─────────┬──────────┘                               │
│                                   │                                          │
│           ┌───────────────────────┼───────────────────────┐                  │
│           │                       │                       │                  │
│           ▼                       ▼                       ▼                  │
│   ┌──────────────┐       ┌──────────────┐        ┌──────────────┐           │
│   │   Service A  │       │   Service B  │        │   Service C  │           │
│   │  ┌────────┐  │       │  ┌────────┐  │        │  ┌────────┐  │           │
│   │  │Circuit │  │       │  │Circuit │  │        │  │Circuit │  │           │
│   │  │Breaker │  │       │  │Breaker │  │        │  │Breaker │  │           │
│   │  └───┬────┘  │       │  └───┬────┘  │        │  └───┬────┘  │           │
│   │      │       │       │      │       │        │      │       │           │
│   │  ┌───▼────┐  │       │  ┌───▼────┐  │        │  ┌───▼────┐  │           │
│   │  │ Retry  │  │       │  │ Retry  │  │        │  │ Retry  │  │           │
│   │  │Pattern │  │       │  │Pattern │  │        │  │Pattern │  │           │
│   │  └────────┘  │       │  └────────┘  │        │  └────────┘  │           │
│   └──────────────┘       └──────────────┘        └──────────────┘           │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│                    PATTERN INTERACTION                                       │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│                         ┌────────────────────┐                               │
│                         │   Rate Limiter     │                               │
│                         │  (Entry Point)     │                               │
│                         └─────────┬──────────┘                               │
│                                   │                                          │
│                                   ▼                                          │
│                         ┌────────────────────┐                               │
│                         │     Bulkhead       │                               │
│                         │ (Resource Limits)  │                               │
│                         └─────────┬──────────┘                               │
│                                   │                                          │
│           ┌───────────────────────┼───────────────────────┐                  │
│           │                       │                       │                  │
│           ▼                       ▼                       ▼                  │
│   ┌──────────────┐       ┌──────────────┐        ┌──────────────┐           │
│   │   Service A  │       │   Service B  │        │   Service C  │           │
│   │  ┌────────┐  │       │  ┌────────┐  │        │  ┌────────┐  │           │
│   │  │Circuit │  │       │  │Circuit │  │        │  │Circuit │  │           │
│   │  │Breaker │  │       │  │Breaker │  │        │  │Breaker │  │           │
│   │  └───┬────┘  │       │  └───┬────┘  │        │  └───┬────┘  │           │
│   │      │       │       │      │       │        │      │       │           │
│   │  ┌───▼────┐  │       │  ┌───▼────┐  │        │  ┌───▼────┐  │           │
│   │  │ Retry  │  │       │  │ Retry  │  │        │  │ Retry  │  │           │
│   │  │Pattern │  │       │  │Pattern │  │        │  │Pattern │  │           │
│   │  └────────┘  │       │  └────────┘  │        │  └────────┘  │           │
│   └──────────────┘       └──────────────┘        └──────────────┘           │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

Quick Reference

速查参考

Circuit Breaker States

Circuit Breaker 状态

StateBehaviorTransitions To
ClosedRequests pass through, failures countedOpen (on threshold)
OpenRequests fail fast, no calls to serviceHalf-Open (after timeout)
Half-OpenLimited requests allowed for testingClosed (on success) / Open (on failure)
状态行为转换目标
Closed请求正常通过,统计故障次数Open(达到阈值时)
Open请求快速失败,不调用服务Half-Open(超时后)
Half-Open允许有限请求用于测试Closed(成功时)/ Open(失败时)

Retry Backoff Strategies

Retry 退避策略

StrategyFormulaUse Case
Fixed
delay
Simple cases, known recovery time
Linear
delay * attempt
Gradual increase
Exponential
delay * 2^(attempt-1)
Unknown recovery, default choice
Exponential + Jitter
exponential ± random
High concurrency, prevents thundering herd
策略公式适用场景
Fixed
delay
简单场景、已知恢复时间
Linear
delay * attempt
逐步增加延迟
Exponential
delay * 2^(attempt-1)
未知恢复时间、默认选择
Exponential + Jitter
exponential ± random
高并发场景、防止惊群效应

Rate Limiter Algorithms

Rate Limiter 算法

AlgorithmPrecisionMemoryBurst Handling
Token BucketMediumLowAllows bursts
Sliding WindowHighMediumSmooth limiting
Fixed WindowLowLowEdge bursts
Leaky BucketHighLowNo bursts
算法精度内存占用突发流量处理
Token Bucket中等允许突发流量
Sliding Window中等平滑限流
Fixed Window边缘突发流量
Leaky Bucket不允许突发流量

Bulkhead Types

Bulkhead 类型

TypeIsolationUse Case
SemaphoreThread/request countSingle-process apps
Thread PoolDedicated threadsCPU-bound work
Queue-basedRequest queueAsync processing
DistributedRedis/shared stateMulti-instance apps
类型隔离方式适用场景
Semaphore线程/请求数限制单进程应用
Thread Pool专用线程隔离CPU密集型任务
Queue-based请求队列隔离异步处理
DistributedRedis/共享状态隔离多实例应用

PHP Implementation Patterns

PHP 实现示例

Circuit Breaker with PSR Clock

基于PSR Clock的Circuit Breaker

php
<?php

declare(strict_types=1);

namespace Infrastructure\Resilience;

use Psr\Clock\ClockInterface;

final class CircuitBreaker
{
    private CircuitState $state = CircuitState::Closed;
    private int $failures = 0;
    private ?\DateTimeImmutable $openedAt = null;

    public function __construct(
        private readonly string $name,
        private readonly int $failureThreshold,
        private readonly int $openTimeoutSeconds,
        private readonly ClockInterface $clock
    ) {}

    public function execute(callable $operation, ?callable $fallback = null): mixed
    {
        if (!$this->isAvailable()) {
            return $fallback ? $fallback() : throw new CircuitOpenException($this->name);
        }

        try {
            $result = $operation();
            $this->recordSuccess();
            return $result;
        } catch (\Throwable $e) {
            $this->recordFailure();
            throw $e;
        }
    }

    private function isAvailable(): bool
    {
        if ($this->state === CircuitState::Closed) return true;
        if ($this->state === CircuitState::Open) {
            if ($this->hasTimeoutElapsed()) {
                $this->state = CircuitState::HalfOpen;
                return true;
            }
            return false;
        }
        return true;
    }
}
php
<?php

declare(strict_types=1);

namespace Infrastructure\Resilience;

use Psr\Clock\ClockInterface;

final class CircuitBreaker
{
    private CircuitState $state = CircuitState::Closed;
    private int $failures = 0;
    private ?\DateTimeImmutable $openedAt = null;

    public function __construct(
        private readonly string $name,
        private readonly int $failureThreshold,
        private readonly int $openTimeoutSeconds,
        private readonly ClockInterface $clock
    ) {}

    public function execute(callable $operation, ?callable $fallback = null): mixed
    {
        if (!$this->isAvailable()) {
            return $fallback ? $fallback() : throw new CircuitOpenException($this->name);
        }

        try {
            $result = $operation();
            $this->recordSuccess();
            return $result;
        } catch (\Throwable $e) {
            $this->recordFailure();
            throw $e;
        }
    }

    private function isAvailable(): bool
    {
        if ($this->state === CircuitState::Closed) return true;
        if ($this->state === CircuitState::Open) {
            if ($this->hasTimeoutElapsed()) {
                $this->state = CircuitState::HalfOpen;
                return true;
            }
            return false;
        }
        return true;
    }
}

Retry with Exponential Backoff

指数退避Retry实现

php
<?php

declare(strict_types=1);

namespace Infrastructure\Resilience;

final readonly class RetryExecutor
{
    public function execute(
        callable $operation,
        int $maxAttempts = 3,
        int $baseDelayMs = 100
    ): mixed {
        $attempt = 0;
        $lastException = null;

        while ($attempt < $maxAttempts) {
            try {
                return $operation();
            } catch (\Throwable $e) {
                $lastException = $e;
                $attempt++;

                if ($attempt < $maxAttempts) {
                    $delay = $baseDelayMs * (2 ** ($attempt - 1));
                    $jitter = random_int(0, (int)($delay * 0.3));
                    usleep(($delay + $jitter) * 1000);
                }
            }
        }

        throw $lastException;
    }
}
php
<?php

declare(strict_types=1);

namespace Infrastructure\Resilience;

final readonly class RetryExecutor
{
    public function execute(
        callable $operation,
        int $maxAttempts = 3,
        int $baseDelayMs = 100
    ): mixed {
        $attempt = 0;
        $lastException = null;

        while ($attempt < $maxAttempts) {
            try {
                return $operation();
            } catch (\Throwable $e) {
                $lastException = $e;
                $attempt++;

                if ($attempt < $maxAttempts) {
                    $delay = $baseDelayMs * (2 ** ($attempt - 1));
                    $jitter = random_int(0, (int)($delay * 0.3));
                    usleep(($delay + $jitter) * 1000);
                }
            }
        }

        throw $lastException;
    }
}

Token Bucket Rate Limiter

Token Bucket Rate Limiter

php
<?php

declare(strict_types=1);

namespace Infrastructure\Resilience;

final class TokenBucketRateLimiter
{
    private float $tokens;
    private int $lastRefill;

    public function __construct(
        private readonly int $capacity,
        private readonly float $refillRate,
        private readonly \Redis $redis,
        private readonly string $key
    ) {
        $this->tokens = $capacity;
        $this->lastRefill = time();
    }

    public function attempt(): bool
    {
        $this->refill();

        if ($this->tokens >= 1) {
            $this->tokens--;
            return true;
        }

        return false;
    }

    private function refill(): void
    {
        $now = time();
        $elapsed = $now - $this->lastRefill;
        $this->tokens = min(
            $this->capacity,
            $this->tokens + ($elapsed * $this->refillRate)
        );
        $this->lastRefill = $now;
    }
}
php
<?php

declare(strict_types=1);

namespace Infrastructure\Resilience;

final class TokenBucketRateLimiter
{
    private float $tokens;
    private int $lastRefill;

    public function __construct(
        private readonly int $capacity,
        private readonly float $refillRate,
        private readonly \Redis $redis,
        private readonly string $key
    ) {
        $this->tokens = $capacity;
        $this->lastRefill = time();
    }

    public function attempt(): bool
    {
        $this->refill();

        if ($this->tokens >= 1) {
            $this->tokens--;
            return true;
        }

        return false;
    }

    private function refill(): void
    {
        $now = time();
        $elapsed = $now - $this->lastRefill;
        $this->tokens = min(
            $this->capacity,
            $this->tokens + ($elapsed * $this->refillRate)
        );
        $this->lastRefill = $now;
    }
}

Common Violations Quick Reference

常见违规速查

ViolationWhere to LookSeverity
No timeout on external callsHTTP clients, DB queriesCritical
Retry without backoffRetry implementationsWarning
No circuit breaker on external servicesAPI clients, adaptersCritical
Unbounded connection poolsDatabase, HTTP poolsWarning
No fallback strategyCircuit breaker usageWarning
Retry non-idempotent operationsCommand handlersCritical
Rate limiting only in-memoryMulti-instance appsWarning
No jitter in retryHigh-concurrency systemsWarning
违规类型检查位置严重程度
外部调用未设置超时HTTP客户端、数据库查询严重
Retry未设置退避Retry实现代码警告
外部服务未使用Circuit BreakerAPI客户端、适配器严重
连接池无边界限制数据库、HTTP连接池警告
无降级策略Circuit Breaker使用处警告
非幂等操作使用Retry命令处理器严重
仅内存级Rate Limiting多实例应用警告
Retry未添加Jitter高并发系统警告

Detection Patterns

检测模式

bash
undefined
bash
undefined

Find resilience implementations

查找弹性实现代码

Glob: /Resilience//.php Glob: /CircuitBreaker//.php Grep: "CircuitBreaker|RateLimiter|Retry" --glob "**/*.php"
Glob: /Resilience//.php Glob: /CircuitBreaker//.php Grep: "CircuitBreaker|RateLimiter|Retry" --glob "**/*.php"

Check for proper timeout usage

检查超时使用是否规范

Grep: "CURLOPT_TIMEOUT|timeout|setTimeout" --glob "/Http//*.php"
Grep: "CURLOPT_TIMEOUT|timeout|setTimeout" --glob "/Http//*.php"

Detect retry patterns

检测Retry模式

Grep: "retry|backoff|exponential" --glob "**/*.php"
Grep: "retry|backoff|exponential" --glob "**/*.php"

Find rate limiting

查找Rate Limiting代码

Grep: "RateLimiter|throttle|TokenBucket" --glob "**/*.php"
Grep: "RateLimiter|throttle|TokenBucket" --glob "**/*.php"

Check for bulkhead patterns

检查Bulkhead模式

Grep: "Semaphore|Bulkhead|maxConcurrent" --glob "**/*.php"
Grep: "Semaphore|Bulkhead|maxConcurrent" --glob "**/*.php"

Detect missing patterns

检测缺失的模式

Grep: "->request(|curl_exec|file_get_contents" --glob "/Infrastructure//*.php"
undefined
Grep: "->request(|curl_exec|file_get_contents" --glob "/Infrastructure//*.php"
undefined

Configuration Guidelines

配置指南

Circuit Breaker Settings

Circuit Breaker 设置

Service TypeFailure ThresholdOpen TimeoutSuccess Threshold
Critical API3-530-60s3-5
Background Job5-1060-120s2-3
Internal Service3-515-30s2-3
Database2-310-20s1-2
服务类型故障阈值打开超时时间成功阈值
核心API3-530-60s3-5
后台任务5-1060-120s2-3
内部服务3-515-30s2-3
数据库2-310-20s1-2

Retry Configuration

Retry 配置

Operation TypeMax AttemptsBase DelayMax Delay
HTTP API Call3100ms10s
Database Query350ms5s
Message Queue51s60s
File Operation210ms100ms
操作类型最大重试次数基础延迟最大延迟
HTTP API调用3100ms10s
数据库查询350ms5s
消息队列51s60s
文件操作210ms100ms

Rate Limiter Settings

Rate Limiter 设置

Endpoint TypeRateWindowBurst
Public API100/min1 min20
Authenticated API1000/min1 min100
Admin API10000/min1 min1000
Webhook60/min1 min10
端点类型速率时间窗口突发流量
公开API100次/分钟1分钟20
已认证API1000次/分钟1分钟100
管理API10000次/分钟1分钟1000
Webhook60次/分钟1分钟10

Integration Points

集成节点

┌─────────────────────────────────────────────────────────────────────────────┐
│                    INFRASTRUCTURE LAYER                                      │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   src/Infrastructure/                                                        │
│   ├── Resilience/                                                           │
│   │   ├── CircuitBreaker/                                                   │
│   │   │   ├── CircuitBreaker.php                                           │
│   │   │   ├── CircuitBreakerConfig.php                                     │
│   │   │   ├── CircuitBreakerRegistry.php                                   │
│   │   │   └── CircuitState.php                                             │
│   │   ├── Retry/                                                            │
│   │   │   ├── RetryExecutor.php                                            │
│   │   │   ├── RetryPolicy.php                                              │
│   │   │   └── BackoffStrategy.php                                          │
│   │   ├── RateLimiter/                                                      │
│   │   │   ├── RateLimiterInterface.php                                     │
│   │   │   ├── TokenBucketRateLimiter.php                                   │
│   │   │   └── SlidingWindowRateLimiter.php                                 │
│   │   └── Bulkhead/                                                         │
│   │       ├── BulkheadInterface.php                                        │
│   │       ├── SemaphoreBulkhead.php                                        │
│   │       └── BulkheadRegistry.php                                         │
│   │                                                                         │
│   ├── Http/                                                                  │
│   │   ├── ResilientHttpClient.php    ◀── Uses CircuitBreaker + Retry       │
│   │   └── Middleware/                                                       │
│   │       └── RateLimitMiddleware.php                                       │
│   │                                                                         │
│   └── Payment/                                                               │
│       └── PaymentGatewayAdapter.php  ◀── Uses CircuitBreaker + Bulkhead    │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│                    INFRASTRUCTURE LAYER                                      │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   src/Infrastructure/                                                        │
│   ├── Resilience/                                                           │
│   │   ├── CircuitBreaker/                                                   │
│   │   │   ├── CircuitBreaker.php                                           │
│   │   │   ├── CircuitBreakerConfig.php                                     │
│   │   │   ├── CircuitBreakerRegistry.php                                   │
│   │   │   └── CircuitState.php                                             │
│   │   ├── Retry/                                                            │
│   │   │   ├── RetryExecutor.php                                            │
│   │   │   ├── RetryPolicy.php                                              │
│   │   │   └── BackoffStrategy.php                                          │
│   │   ├── RateLimiter/                                                      │
│   │   │   ├── RateLimiterInterface.php                                     │
│   │   │   ├── TokenBucketRateLimiter.php                                   │
│   │   │   └── SlidingWindowRateLimiter.php                                 │
│   │   └── Bulkhead/                                                         │
│   │       ├── BulkheadInterface.php                                        │
│   │       ├── SemaphoreBulkhead.php                                        │
│   │       └── BulkheadRegistry.php                                         │
│   │                                                                         │
│   ├── Http/                                                                  │
│   │   ├── ResilientHttpClient.php    ◀── 使用CircuitBreaker + Retry       │
│   │   └── Middleware/                                                       │
│   │       └── RateLimitMiddleware.php                                       │
│   │                                                                         │
│   └── Payment/                                                               │
│       └── PaymentGatewayAdapter.php  ◀── 使用CircuitBreaker + Bulkhead    │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

Advanced Resilience Patterns

高级弹性模式

Backpressure Mechanisms

背压机制

StrategyHow It WorksPHP Example
DropDiscard excess requestsRate limiter returning 429
BufferQueue up to limitRabbitMQ with max-length
ThrottleSlow down producerSleep between batch items
RejectRefuse, signal overloadHTTP 503 Service Unavailable
ScaleAdd more consumersAuto-scaling worker pool
策略工作原理PHP示例
Drop丢弃超额请求Rate Limiter返回429
Buffer队列存储至上限RabbitMQ设置max-length
Throttle降低生产者速度批量处理间添加Sleep
Reject拒绝请求并标记过载返回HTTP 503 Service Unavailable
Scale添加更多消费者自动扩容工作池

Graceful Degradation Levels

优雅降级级别

LevelModeWhat Happens
0FullAll features active
1Non-Critical OffRecommendations, analytics disabled
2Read-OnlyWrites disabled, reads from cache
3Static FallbackServe cached/static content only
4MaintenanceSystem unavailable page
级别模式行为
0完全模式所有功能启用
1非核心功能关闭推荐、分析功能禁用
2只读模式写操作禁用,读取缓存
3静态降级仅提供缓存/静态内容
4维护模式显示系统不可用页面

Adaptive Retry Jitter Algorithms

自适应Retry Jitter算法

AlgorithmFormulaBest For
Full Jitter
random(0, base * 2^attempt)
High concurrency
Equal Jitter
half + random(0, half)
Balanced spread
Decorrelated
random(base, prev_delay * 3)
Sequential retries
算法公式最佳场景
Full Jitter
random(0, base * 2^attempt)
高并发场景
Equal Jitter
half + random(0, half)
均衡分布
Decorrelated
random(base, prev_delay * 3)
顺序重试

Health Check Types

健康检查类型

CheckEndpointPurpose
Liveness
/health/live
Process running (restart if fails)
Readiness
/health/ready
Can accept traffic (remove from LB)
Startup
/health/startup
Has initialized
检查类型端点用途
Liveness
/health/live
进程是否运行(失败则重启)
Readiness
/health/ready
是否可接收流量(失败则从负载均衡移除)
Startup
/health/startup
是否完成初始化

Chaos Engineering Principles

混沌工程原则

PracticeDescription
Steady state hypothesisDefine normal behavior metrics
Vary real-world eventsInject realistic failures
Run in productionTest real behavior
Minimize blast radiusLimit failure scope
Automate experimentsContinuous chaos testing
实践说明
稳态假设定义正常行为指标
模拟真实事件注入真实故障场景
生产环境测试测试真实行为
最小影响范围限制故障影响
自动化实验持续混沌测试

References

参考资料

For detailed information, load these reference files:
  • references/circuit-breaker.md
    — Circuit Breaker implementation details
  • references/retry-patterns.md
    — Retry strategies and backoff algorithms
  • references/rate-limiting.md
    — Rate limiting algorithms and configurations
  • references/bulkhead.md
    — Bulkhead isolation patterns
  • references/advanced-resilience.md
    — Backpressure mechanisms, graceful degradation, adaptive retry with jitter, chaos engineering, health-based routing, fallback strategies
如需详细信息,请查看以下参考文件:
  • references/circuit-breaker.md
    — Circuit Breaker实现细节
  • references/retry-patterns.md
    — Retry策略与退避算法
  • references/rate-limiting.md
    — Rate Limiting算法与配置
  • references/bulkhead.md
    — Bulkhead隔离模式
  • references/advanced-resilience.md
    — 背压机制、优雅降级、带Jitter的自适应Retry、混沌工程、基于健康状态的路由、降级策略

Assets

资源

  • assets/report-template.md
    — Structured audit report template
  • assets/report-template.md
    — 结构化审计报告模板