[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CXPVF7JKTXX6HRZYRY4KM1":3,"skill-same:01M6CXPVF7JKTXX6HRZYRY4KM1":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M6CXPVF7JKTXX6HRZYRY4KM1","high-availability",null,"High availability architecture and implementation for fault-tolerant distributed systems","ffsshhttiikk\u002Fopencode-agents-skills","ffsshhttiikk","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F226346827?v=4","01M6CWD9RR3Y7VRQX3MXYC8FYH","01M6CWD9WVPYAZW0J82G1VKGHY",3,"MIT","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fsystems-administration\u002Fhigh-availability\u002FSKILL.md",[],[18,19,20,21,22,23],"high availability","architecture","distributed","opencode","implementation","distributed systems","2026-11-10 10:12:30",false,"---\nname: high-availability\ndescription: High availability architecture and implementation for fault-tolerant distributed systems\nlicense: MIT\ncompatibility: opencode\nmetadata:\n  audience: architects\n  category: systems-administration\n---\n\n## What I do\n- Design high availability architectures\n- Implement load balancing strategies\n- Configure failover clustering\n- Set up database replication\n- Design multi-region deployments\n- Implement circuit breakers\n- Create health checks and redundancy\n- Configure session and state management\n- Design for horizontal scaling\n- Implement chaos engineering\n\n## When to use me\nWhen designing fault-tolerant systems, implementing high availability infrastructure, or architecting for uptime requirements.\n\n## Core Concepts\n- Active-active and active-passive configurations\n- Load balancing algorithms and strategies\n- Failover mechanisms and detection\n- Database replication (master-slave, multi-master)\n- Consensus algorithms (Raft, Paxos)\n- Circuit breaker patterns\n- Service mesh architectures\n- DNS-based failover\n- CDN and edge caching\n- Disaster recovery vs high availability\n\n## Code Examples\n\n### Load Balancer Configuration\n```nginx\n# Nginx HA configuration\nupstream backend {\n    least_conn;\n    \n    server 10.0.1.10:8080 max_fails=3 fail_timeout=30s;\n    server 10.0.1.11:8080 max_fails=3 fail_timeout=30s;\n    server 10.0.1.12:8080 max_fails=3 fail_timeout=30s backup;\n    \n    keepalive 32;\n}\n\nserver {\n    listen 443 ssl http2;\n    server_name app.example.com;\n    \n    ssl_certificate \u002Fetc\u002Fssl\u002Fcerts\u002Fapp.crt;\n    ssl_certificate_key \u002Fetc\u002Fssl\u002Fprivate\u002Fapp.key;\n    ssl_protocols TLSv1.2 TLSv1.3;\n    \n    # Health check endpoint\n    location \u002Fhealth {\n        proxy_pass http:\u002F\u002Fbackend;\n        proxy_connect_timeout 5s;\n        proxy_read_timeout 10s;\n        health_check interval=5 passes=2 fails=3;\n    }\n    \n    location \u002F {\n        proxy_pass http:\u002F\u002Fbackend;\n        proxy_http_version 1.1;\n        proxy_set_header Connection \"\";\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        \n        # Circuit breaker\n        proxy_next_upstream error timeout http_503 http_504;\n        proxy_connect_timeout 10s;\n        proxy_send_timeout 60s;\n        proxy_read_timeout 60s;\n    }\n    \n    # Rate limiting\n    limit_req_zone $binary_remote_addr zone=api:10m rate=100r\u002Fs;\n    \n    location \u002Fapi\u002F {\n        limit_req zone=api burst=20 nodelay;\n        proxy_pass http:\u002F\u002Fbackend;\n    }\n}\n```\n\n```haproxy\n# haproxy.cfg\nglobal\n    log 127.0.0.1 local0\n    maxconn 4096\n    daemon\n    tune.ssl.default-dh-param 2048\n\ndefaults\n    log global\n    mode http\n    option httplog\n    option dontlognull\n    timeout connect 5000ms\n    timeout client 50000ms\n    timeout server 50000ms\n    retries 3\n\nfrontend http-in\n    bind *:80\n    bind *:443 ssl crt \u002Fetc\u002Fssl\u002Fcerts\u002F\n    \n    acl is-health-check src 10.0.0.0\u002F8\n    use_backend health if is-health-check\n    \n    default_backend app-servers\n\nbackend app-servers\n    balance roundrobin\n    option httpchk GET \u002Fhealth\n    http-check expect status 200\n    \n    server app1 10.0.1.10:8080 check inter 5s rise 2 fall 3\n    server app2 10.0.1.11:8080 check inter 5s rise 2 fall 3\n    server app3 10.0.1.12:8080 check inter 5s rise 2 fall 3 backup\n    \n    # Stickiness\n    stick-table type ip size 200k expire 30m\n    stick on src\n    \n    # Circuit breaker\n    http-request track-sc0 src\n    acl conn_fail sc1_conn_fail gt 3\n    acl mark_remove sc1_marked_remove lt 1\n    http-request silent-drop if conn_fail mark_remove\n\nbackend health\n    server health1 10.0.0.1:9090 check\n```\n\n### Database HA Configuration\n```yaml\n# PostgreSQL Patroni configuration\nrestapi:\n  listen: 0.0.0.0:8008\n  connect_address: 10.0.1.10:8008\n  authentication:\n    username: admin\n    password: ${PATRONI_PASSWORD}\n\netcd:\n  host: 10.0.1.20:2379\n  protocols: http\n  cacert: \u002Fetc\u002Fssl\u002Fcerts\u002Fca.crt\n  key: \u002Fetc\u002Fssl\u002Fprivate\u002Fpatroni.key\n  cert: \u002Fetc\u002Fssl\u002Fcerts\u002Fpatroni.crt\n\nbootstrap:\n  dcs:\n    ttl: 30\n    loop_wait: 10\n    retry_timeout: 10\n    maximum_lag_on_failover: 1048576\n    master_start_timeout: 300\n    synchronous_mode: false\n\n  pg_hba:\n    - host replication replicator 10.0.1.0\u002F24 md5\n    - host all all 0.0.0.0\u002F0 md5\n\npostgresql:\n  listen: 0.0.0.0:5432\n  connect_address: 10.0.1.10:5432\n  authentication:\n    replication:\n      username: replication\n      password: ${REPLICATION_PASSWORD}\n    superuser:\n      username: postgres\n      password: ${SUPERUSER_PASSWORD}\n  parameters:\n    max_connections: 200\n    shared_buffers: 4GB\n    work_mem: 64MB\n    maintenance_work_mem: 1GB\n    effective_cache_size: 12GB\n    synchronous_commit: on\n    synchronous_standby_names: '*'\n  pg_rewind:\n    username: postgres\n    password: ${SUPERUSER_PASSWORD}\n```\n\n### Circuit Breaker Implementation\n```python\nimport asyncio\nfrom enum import Enum\nfrom dataclasses import dataclass\nfrom typing import Callable, Any\nimport time\n\nclass CircuitState(Enum):\n    CLOSED = \"closed\"\n    OPEN = \"open\"\n    HALF_OPEN = \"half_open\"\n\n@dataclass\nclass CircuitBreakerConfig:\n    failure_threshold: int = 5\n    success_threshold: int = 2\n    timeout_seconds: float = 60.0\n    sampling_window: int = 60\n\nclass CircuitBreaker:\n    def __init__(self, name: str, config: CircuitBreakerConfig = None):\n        self.name = name\n        self.config = config or CircuitBreakerConfig()\n        self.state = CircuitState.CLOSED\n        self.failures = 0\n        self.successes = 0\n        self.last_failure_time = 0\n        self._lock = asyncio.Lock()\n    \n    async def call(self, func: Callable, *args, **kwargs) -> Any:\n        async with self._lock:\n            if self._should_open():\n                self.state = CircuitState.OPEN\n                self.last_failure_time = time.time()\n            \n            if self.state == CircuitState.OPEN:\n                if self._timeout_elapsed():\n                    self.state = CircuitState.HALF_OPEN\n                else:\n                    raise CircuitOpenError(f\"Circuit breaker {self.name} is open\")\n        \n        return await self._execute(func, *args, **kwargs)\n    \n    async def _execute(self, func: Callable, *args, **kwargs) -> Any:\n        try:\n            result = await func(*args, **kwargs)\n            await self._on_success()\n            return result\n        except Exception as e:\n            await self._on_failure()\n            raise\n    \n    async def _on_success(self):\n        async with self._lock:\n            if self.state == CircuitState.HALF_OPEN:\n                self.successes += 1\n                if self.successes >= self.config.success_threshold:\n                    self.state = CircuitState.CLOSED\n                    self.failures = 0\n                    self.successes = 0\n    \n    async def _on_failure(self):\n        async with self._lock:\n            self.failures += 1\n            if self.state == CircuitState.HALF_OPEN:\n                self.state = CircuitState.OPEN\n                self.last_failure_time = time.time()\n                self.successes = 0\n    \n    def _should_open(self) -> bool:\n        return (self.state == CircuitState.HALF_OPEN and \n                self.failures >= self.config.failure_threshold)\n    \n    def _timeout_elapsed(self) -> bool:\n        return time.time() - self.last_failure_time > self.config.timeout_seconds\n\n# Usage\ncircuit = CircuitBreaker(\"database\", CircuitBreakerConfig(\n    failure_threshold=3,\n    timeout_seconds=30\n))\n\nasync def get_user(user_id: int):\n    async with circuit:\n        return await database.query(\"SELECT * FROM users WHERE id = ?\", user_id)\n```\n\n### Health Check Aggregation\n```python\nfrom typing import Dict, List\nfrom dataclasses import dataclass\nfrom enum import Enum\nimport asyncio\n\nclass HealthStatus(Enum):\n    HEALTHY = \"healthy\"\n    DEGRADED = \"degraded\"\n    UNHEALTHY = \"unhealthy\"\n\n@dataclass\nclass ComponentHealth:\n    name: str\n    status: HealthStatus\n    latency_ms: float\n    message: str\n    details: dict = None\n\nclass HealthChecker:\n    def __init__(self):\n        self.checks = {}\n    \n    def register_check(self, name: str, check_func: callable):\n        self.checks[name] = check_func\n    \n    async def check_all(self) -> Dict[str, ComponentHealth]:\n        results = {}\n        tasks = []\n        \n        for name, check_func in self.checks.items():\n            tasks.append(self._run_check(name, check_func))\n        \n        for result in await asyncio.gather(*tasks, return_exceptions=True):\n            if isinstance(result, Exception):\n                results[\"unknown\"] = ComponentHealth(\n                    name=\"unknown\",\n                    status=HealthStatus.UNHEALTHY,\n                    latency_ms=0,\n                    message=str(result)\n                )\n            else:\n                results[result.name] = result\n        \n        return results\n    \n    async def _run_check(self, name: str, check_func: callable) -> ComponentHealth:\n        start = time.time()\n        try:\n            if asyncio.iscoroutinefunction(check_func):\n                result = await check_func()\n            else:\n                result = check_func()\n            \n            latency_ms = (time.time() - start) * 1000\n            \n            return ComponentHealth(\n                name=name,\n                status=HealthStatus.HEALTHY if result else HealthStatus.DEGRADED,\n                latency_ms=latency_ms,\n                message=\"Check passed\" if result else \"Check returned unhealthy\"\n            )\n        except Exception as e:\n            return ComponentHealth(\n                name=name,\n                status=HealthStatus.UNHEALTHY,\n                latency_ms=(time.time() - start) * 1000,\n                message=str(e)\n            )\n    \n    def aggregate_status(self, healths: Dict[str, ComponentHealth]) -> HealthStatus:\n        statuses = [h.status for h in healths.values()]\n        \n        if any(s == HealthStatus.UNHEALTHY for s in statuses):\n            return HealthStatus.UNHEALTHY\n        elif any(s == HealthStatus.DEGRADED for s in statuses):\n            return HealthStatus.DEGRADED\n        return HealthStatus.HEALTHY\n\n# Usage\nchecker = HealthChecker()\nchecker.register_check(\"database\", lambda: db.health_check())\nchecker.register_check(\"redis\", lambda: redis.ping())\nchecker.register_check(\"external_api\", external_api.health_check)\n\nasync def health_endpoint():\n    healths = await checker.check_all()\n    status = checker.aggregate_status(healths)\n    return {\"status\": status.value, \"components\": healths}\n```\n\n## Best Practices\n- Design for failure - assume components will fail\n- Use active-active for true high availability\n- Implement proper health checks at multiple levels\n- Keep configurations version-controlled\n- Test failover procedures regularly\n- Monitor SLIs and SLOs actively\n- Use circuit breakers to prevent cascade failures\n- Maintain proper capacity buffers\n- Document failure modes and runbooks\n- Consider geographic redundancy for disaster recovery\n","## What I do\n- Design high availability architectures\n- Implement load balancing strategies\n- Configure failover clustering\n- Set up database replication\n- Design multi-region deployments\n- Implement circuit breakers\n- Create health checks and redundancy\n- Configure session and state management\n- Design for horizontal scaling\n- Implement chaos engineering\n\n## When to use me\nWhen designing fault-tolerant systems, implementing high availability infrastructure, or architecting for uptime requirements.\n\n## Core Concepts\n- Active-active and active-passive configurations\n- Load balancing algorithms and strategies\n- Failover mechanisms and detection\n- Database replication (master-slave, multi-master)\n- Consensus algorithms (Raft, Paxos)\n- Circuit breaker patterns\n- Service mesh architectures\n- DNS-based failover\n- CDN and edge caching\n- Disaster recovery vs high availability\n\n## Code Examples\n\n### Load Balancer Configuration\n```nginx\n# Nginx HA configuration\nupstream backend {\n    least_conn;\n    \n    server 10.0.1.10:8080 max_fails=3 fail_timeout=30s;\n    server 10.0.1.11:8080 max_fails=3 fail_timeout=30s;\n    server 10.0.1.12:8080 max_fails=3 fail_timeout=30s backup;\n    \n    keepalive 32;\n}\n\nserver {\n    listen 443 ssl http2;\n    server_name app.example.com;\n    \n    ssl_certificate \u002Fetc\u002Fssl\u002Fcerts\u002Fapp.crt;\n    ssl_certificate_key \u002Fetc\u002Fssl\u002Fprivate\u002Fapp.key;\n    ssl_protocols TLSv1.2 TLSv1.3;\n    \n    # Health check endpoint\n    location \u002Fhealth {\n        proxy_pass http:\u002F\u002Fbackend;\n        proxy_connect_timeout 5s;\n        proxy_read_timeout 10s;\n        health_check interval=5 passes=2 fails=3;\n    }\n    \n    location \u002F {\n        proxy_pass http:\u002F\u002Fbackend;\n        proxy_http_version 1.1;\n        proxy_set_header Connection \"\";\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        \n        # Circuit breaker\n        proxy_next_upstream error timeout http_503 http_504;\n        proxy_connect_timeout 10s;\n        proxy_send_timeout 60s;\n        proxy_read_timeout 60s;\n    }\n    \n    # Rate limiting\n    limit_req_zone $binary_remote_addr zone=api:10m rate=100r\u002Fs;\n    \n    location \u002Fapi\u002F {\n        limit_req zone=api burst=20 nodelay;\n        proxy_pass http:\u002F\u002Fbackend;\n    }\n}\n```\n\n```haproxy\n# haproxy.cfg\nglobal\n    log 127.0.0.1 local0\n    maxconn 4096\n    daemon\n    tune.ssl.default-dh-param 2048\n\ndefaults\n    log global\n    mode http\n    option httplog\n    option dontlognull\n    timeout connect 5000ms\n    timeout client 50000ms\n    timeout server 50000ms\n    retries 3\n\nfrontend http-in\n    bind *:80\n    bind *:443 ssl crt \u002Fetc\u002Fssl\u002Fcerts\u002F\n    \n    acl is-health-check src 10.0.0.0\u002F8\n    use_backend health if is-health-check\n    \n    default_backend app-servers\n\nbackend app-servers\n    balance roundrobin\n    option httpchk GET \u002Fhealth\n    http-check expect status 200\n    \n    server app1 10.0.1.10:8080 check inter 5s rise 2 fall 3\n    server app2 10.0.1.11:8080 check inter 5s rise 2 fall 3\n    server app3 10.0.1.12:8080 check inter 5s rise 2 fall 3 backup\n    \n    # Stickiness\n    stick-table type ip size 200k expire 30m\n    stick on src\n    \n    # Circuit breaker\n    http-request track-sc0 src\n    acl conn_fail sc1_conn_fail gt 3\n    acl mark_remove sc1_marked_remove lt 1\n    http-request silent-drop if conn_fail mark_remove\n\nbackend health\n    server health1 10.0.0.1:9090 check\n```\n\n### Database HA Configuration\n```yaml\n# PostgreSQL Patroni configuration\nrestapi:\n  listen: 0.0.0.0:8008\n  connect_address: 10.0.1.10:8008\n  authentication:\n    username: admin\n    password: ${PATRONI_PASSWORD}\n\netcd:\n  host: 10.0.1.20:2379\n  protocols: http\n  cacert: \u002Fetc\u002Fssl\u002Fcerts\u002Fca.crt\n  key: \u002Fetc\u002Fssl\u002Fprivate\u002Fpatroni.key\n  cert: \u002Fetc\u002Fssl\u002Fcerts\u002Fpatroni.crt\n\nbootstrap:\n  dcs:\n    ttl: 30\n    loop_wait: 10\n    retry_timeout: 10\n    maximum_lag_on_failover: 1048576\n    master_start_timeout: 300\n    synchronous_mode: false\n\n  pg_hba:\n    - host replication replicator 10.0.1.0\u002F24 md5\n    - host all all 0.0.0.0\u002F0 md5\n\npostgresql:\n  listen: 0.0.0.0:5432\n  connect_address: 10.0.1.10:5432\n  authentication:\n    replication:\n      username: replication\n      password: ${REPLICATION_PASSWORD}\n    superuser:\n      username: postgres\n      password: ${SUPERUSER_PASSWORD}\n  parameters:\n    max_connections: 200\n    shared_buffers: 4GB\n    work_mem: 64MB\n    maintenance_work_mem: 1GB\n    effective_cache_size: 12GB\n    synchronous_commit: on\n    synchronous_standby_names: '*'\n  pg_rewind:\n    username: postgres\n    password: ${SUPERUSER_PASSWORD}\n```\n\n### Circuit Breaker Implementation\n```python\nimport asyncio\nfrom enum import Enum\nfrom dataclasses import dataclass\nfrom typing import Callable, Any\nimport time\n\nclass CircuitState(Enum):\n    CLOSED = \"closed\"\n    OPEN = \"open\"\n    HALF_OPEN = \"half_open\"\n\n@dataclass\nclass CircuitBreakerConfig:\n    failure_threshold: int = 5\n    success_threshold: int = 2\n    timeout_seconds: float = 60.0\n    sampling_window: int = 60\n\nclass CircuitBreaker:\n    def __init__(self, name: str, config: CircuitBreakerConfig = None):\n        self.name = name\n        self.config = config or CircuitBreakerConfig()\n        self.state = CircuitState.CLOSED\n        self.failures = 0\n        self.successes = 0\n        self.last_failure_time = 0\n        self._lock = asyncio.Lock()\n    \n    async def call(self, func: Callable, *args, **kwargs) -> Any:\n        async with self._lock:\n            if self._should_open():\n                self.state = CircuitState.OPEN\n                self.last_failure_time = time.time()\n            \n            if self.state == CircuitState.OPEN:\n                if self._timeout_elapsed():\n                    self.state = CircuitState.HALF_OPEN\n                else:\n                    raise CircuitOpenError(f\"Circuit breaker {self.name} is open\")\n        \n        return await self._execute(func, *args, **kwargs)\n    \n    async def _execute(self, func: Callable, *args, **kwargs) -> Any:\n        try:\n            result = await func(*args, **kwargs)\n            await self._on_success()\n            return result\n        except Exception as e:\n            await self._on_failure()\n            raise\n    \n    async def _on_success(self):\n        async with self._lock:\n            if self.state == CircuitState.HALF_OPEN:\n                self.successes += 1\n                if self.successes >= self.config.success_threshold:\n                    self.state = CircuitState.CLOSED\n                    self.failures = 0\n                    self.successes = 0\n    \n    async def _on_failure(self):\n        async with self._lock:\n            self.failures += 1\n            if self.state == CircuitState.HALF_OPEN:\n                self.state = CircuitState.OPEN\n                self.last_failure_time = time.time()\n                self.successes = 0\n    \n    def _should_open(self) -> bool:\n        return (self.state == CircuitState.HALF_OPEN and \n                self.failures >= self.config.failure_threshold)\n    \n    def _timeout_elapsed(self) -> bool:\n        return time.time() - self.last_failure_time > self.config.timeout_seconds\n\n# Usage\ncircuit = CircuitBreaker(\"database\", CircuitBreakerConfig(\n    failure_threshold=3,\n    timeout_seconds=30\n))\n\nasync def get_user(user_id: int):\n    async with circuit:\n        return await database.query(\"SELECT * FROM users WHERE id = ?\", user_id)\n```\n\n### Health Check Aggregation\n```python\nfrom typing import Dict, List\nfrom dataclasses import dataclass\nfrom enum import Enum\nimport asyncio\n\nclass HealthStatus(Enum):\n    HEALTHY = \"healthy\"\n    DEGRADED = \"degraded\"\n    UNHEALTHY = \"unhealthy\"\n\n@dataclass\nclass ComponentHealth:\n    name: str\n    status: HealthStatus\n    latency_ms: float\n    message: str\n    details: dict = None\n\nclass HealthChecker:\n    def __init__(self):\n        self.checks = {}\n    \n    def register_check(self, name: str, check_func: callable):\n        self.checks[name] = check_func\n    \n    async def check_all(self) -> Dict[str, ComponentHealth]:\n        results = {}\n        tasks = []\n        \n        for name, check_func in self.checks.items():\n            tasks.append(self._run_check(name, check_func))\n        \n        for result in await asyncio.gather(*tasks, return_exceptions=True):\n            if isinstance(result, Exception):\n                results[\"unknown\"] = ComponentHealth(\n                    name=\"unknown\",\n                    status=HealthStatus.UNHEALTHY,\n                    latency_ms=0,\n                    message=str(result)\n                )\n            else:\n                results[result.name] = result\n        \n        return results\n    \n    async def _run_check(self, name: str, check_func: callable) -> ComponentHealth:\n        start = time.time()\n        try:\n            if asyncio.iscoroutinefunction(check_func):\n                result = await check_func()\n            else:\n                result = check_func()\n            \n            latency_ms = (time.time() - start) * 1000\n            \n            return ComponentHealth(\n                name=name,\n                status=HealthStatus.HEALTHY if result else HealthStatus.DEGRADED,\n                latency_ms=latency_ms,\n                message=\"Check passed\" if result else \"Check returned unhealthy\"\n            )\n        except Exception as e:\n            return ComponentHealth(\n                name=name,\n                status=HealthStatus.UNHEALTHY,\n                latency_ms=(time.time() - start) * 1000,\n                message=str(e)\n            )\n    \n    def aggregate_status(self, healths: Dict[str, ComponentHealth]) -> HealthStatus:\n        statuses = [h.status for h in healths.values()]\n        \n        if any(s == HealthStatus.UNHEALTHY for s in statuses):\n            return HealthStatus.UNHEALTHY\n        elif any(s == HealthStatus.DEGRADED for s in statuses):\n            return HealthStatus.DEGRADED\n        return HealthStatus.HEALTHY\n\n# Usage\nchecker = HealthChecker()\nchecker.register_check(\"database\", lambda: db.health_check())\nchecker.register_check(\"redis\", lambda: redis.ping())\nchecker.register_check(\"external_api\", external_api.health_check)\n\nasync def health_endpoint():\n    healths = await checker.check_all()\n    status = checker.aggregate_status(healths)\n    return {\"status\": status.value, \"components\": healths}\n```\n\n## Best Practices\n- Design for failure - assume components will fail\n- Use active-active for true high availability\n- Implement proper health checks at multiple levels\n- Keep configurations version-controlled\n- Test failover procedures regularly\n- Monitor SLIs and SLOs actively\n- Use circuit breakers to prevent cascade failures\n- Maintain proper capacity buffers\n- Document failure modes and runbooks\n- Consider geographic redundancy for disaster recovery\n",{"name":5,"license":14,"metadata":29,"description":7,"compatibility":21},{"audience":30,"category":31},"architects","systems-administration","main","5f7a3e453c98261f93d19a6a7de44ad8f7b72d41","systems-administration\u002Fhigh-availability",2,"https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk","2026-03-01 06:55:40",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add ffsshhttiikk\u002Fopencode-agents-skills --skill high-availability",{"tool":45,"command":46},"bunx","bunx skills add ffsshhttiikk\u002Fopencode-agents-skills --skill high-availability",{"tool":48,"command":49},"pnpm","pnpm dlx skills add ffsshhttiikk\u002Fopencode-agents-skills --skill high-availability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fsystems-administration\u002Fhigh-availability\u002FSKILL.md",true,[],[54,65,75,84,94,103],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":24},"01M6CXT9TXDF79BWJTMQAPB49G","xamarin","Xamarin cross-platform development","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fxamarin\u002FSKILL.md",[],[56,61,62,63,21,64],"platform","cross-platform","mobile","development",{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":24},"01M6CXT8AD04MFYDA32VW3FKAG","wrangling","Data wrangling fundamentals","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwrangling\u002FSKILL.md",[],[67,72,21,73,74],"data wrangling","science","data",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":24},"01M6CXT717GCN7SRRNPBDP4508","windows","Windows operating system administration and scripting","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwindows\u002FSKILL.md",[],[77,82,21,83],"system","scripting",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":24},"01M6CXT54K794NMEM3XAPZZDKT","wide-column","Wide-column data model","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwide-column\u002FSKILL.md",[],[91,92,21,93,74],"wide column","databases","model",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":24},"01M6CXT28FMT2P4V9GZE67WA8E","wide-column-stores","Wide-column database stores","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwide-column-stores\u002FSKILL.md",[],[101,92,21,102],"wide column stores","database",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":24},"01M6CXT0D0M0Q4T2N7C2RX7DSN","websockets","WebSocket implementation and best practices","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwebsockets\u002FSKILL.md",[],[105,110,111,112,21,113,22],"websocket","real-time","time","best practices"]