Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

gcp-waf-reliability

БесплатноБез исполняемых скриптовНе проверен

Apply the Google Cloud Well-Architected Framework's Reliability pillar — define user-centric SLOs, eliminate single points of failure with multi-zone/region…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

GCP Well-Architected Framework — Reliability

Overview

Reliability is measured by user experience, not infrastructure uptime. A system can be 100% green on the infra dashboard while users see broken checkout — that's the gap SLOs close. This skill applies the Google Cloud Well-Architected Framework's Reliability pillar to design, evaluate, and harden production workloads.

Instructions

The Reliability pillar groups its principles into four focus areas: scoping (understand the architecture and its failure modes), observation (monitoring), response (recovery) and learning (postmortems).

Core Principles

Principle What it means
Define reliability via user experience Measure what users feel (request success rate, latency p99, page-load time), not just CPU/disk
Set realistic SLO targets 99.9% is roughly 43 min/month of error budget; 99.99% is 4 min — pick what your business actually needs
Build redundancy No single zone, region, or service should take down the user experience
Scale horizontally More instances, not bigger instances; this is also fault tolerance
Detect via observability Metrics + logs + traces; alert on user-facing symptoms, not on causes
Degrade gracefully Read-only mode, cached responses, queue-and-retry beat hard failures
Test failure recovery Practice failover, restore-from-backup, regional evacuation
Blameless postmortems Document the system flaw that allowed the human error

Defining SLIs and SLOs

The Cloud Monitoring SLO API has no gcloud monitoring services or slos commands (gcloud monitoring only manages alerts, dashboards, policies, snoozes and uptime checks). Create the service and the SLO with the REST API:

PROJECT=orders-prod-4821
TOKEN=$(gcloud auth print-access-token)

curl -sS -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  "https://monitoring.googleapis.com/v3/projects/$PROJECT/services?serviceId=web-frontend" \
  -d '{"displayName": "Web frontend", "custom": {}}'

curl -sS -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  "https://monitoring.googleapis.com/v3/projects/$PROJECT/services/web-frontend/serviceLevelObjectives?serviceLevelObjectiveId=availability-28d" \
  -d @availability-slo.json
{
  "displayName": "99.9% of requests succeed over 28 days",
  "goal": 0.999,
  "rollingPeriod": "2419200s",
  "serviceLevelIndicator": {
    "requestBased": {
      "goodTotalRatio": {
        "goodServiceFilter": "resource.type=\"https_lb_rule\" metric.type=\"loadbalancing.googleapis.com/https/request_count\" resource.labels.url_map_name=\"web-frontend\" metric.labels.response_code_class=\"200\"",
        "totalServiceFilter": "resource.type=\"https_lb_rule\" metric.type=\"loadbalancing.googleapis.com/https/request_count\" resource.labels.url_map_name=\"web-frontend\""
      }
    }
  }
}

rollingPeriod must be a whole number of days, at most 30. Alternatively use calendarPeriod (DAY, WEEK, FORTNIGHT, MONTH).

Multi-Zone and Multi-Region Redundancy

# Regional GKE cluster (control plane + nodes across 3 zones)
gcloud container clusters create-auto prod \
  --region=us-central1  # NOT --zone, which is single-zone

# Regional Cloud SQL (synchronous standby in another zone)
gcloud sql instances create orders \
  --availability-type=REGIONAL \
  --region=us-central1

# Regional persistent disks (replicated synchronously across two zones)
gcloud compute disks create app-data \
  --type=pd-balanced --size=500GB \
  --region=us-central1 --replica-zones=us-central1-a,us-central1-b
# Multi-region Cloud Storage (geo-redundant by default)
gcloud storage buckets create gs://orders-prod-4821-data \
  --location=US --default-storage-class=STANDARD

For workloads with multi-region SLOs, deploy to two regions behind one global external Application Load Balancer (--load-balancing-scheme=EXTERNAL_MANAGED) with a backend service per region and health checks; the load balancer shifts traffic away from an unhealthy region by itself, so no DNS failover is needed. Cloud Spanner is the right database when you need synchronous multi-region writes.

Horizontal Autoscaling

# GKE HPA — scale on CPU + an external metric (needs the Custom Metrics Stackdriver Adapter installed)
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata: { name: api }
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: api
  minReplicas: 3              # never below 3 (one per zone)
  maxReplicas: 50
  metrics:
    - type: Resource
      resource: { name: cpu, target: { type: Utilization, averageUtilization: 70 } }
    - type: External
      external:
        metric:
          name: pubsub.googleapis.com|subscription|num_undelivered_messages
          selector: { matchLabels: { resource.labels.subscription_id: events-sub } }
        target:
Полный SKILL.md на GitHub

Установить gcp-waf-reliability в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл gcp-waf-reliability?

Apply the Google Cloud Well-Architected Framework's Reliability pillar — define user-centric SLOs, eliminate single points of failure with multi-zone/region redundancy, configure horizontal autoscaling, observability via Cloud Monitoring, graceful degradation patterns, DR testing, and blameless postmortems. Use for production readiness reviews and SRE practices.

Как установить скилл gcp-waf-reliability?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл gcp-waf-reliability запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить gcp-waf-reliability с