{"id":"6b09aa7f5a5e2dbc3f20a485","slug":"kubernetes-production","title":"Kubernetes in production – Helm, namespaces and RBAC, NetworkPolicy, PDB, autoscaling, observability and GitOps","summary":"A cluster that works in a demo and a cluster you can trust with Friday-night sales are separated by a dozen decisions. We package the dumpling-shop API as a Helm chart, isolate teams with namespaces, quotas and RBAC, lock down traffic with network policies, protect availability with a disruption budget, scale pods (HPA, KEDA) and nodes, measure what users feel, and deploy through GitOps with Argo CD. Finally, a checklist and ways to lower the bill.","servedLang":"en","availableLangs":["pl","en"],"topics":["kubernetes","secrets-management","microservices"],"techs":["general"],"tags":["kubernetes","helm","rbac","network-policy","pod-disruption-budget","hpa","keda","karpenter","prometheus","grafana","argo-cd","gitops","finops"],"level":"advanced","kind":"tutorial","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":18,"stats":{"views":2,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-27T16:06:23.598Z","updatedAt":"2026-11-27T17:28:35.669Z","requestedLang":"en","theme":{"hero":"classic","heroMedia":null,"accent":"amber","background":"hex","weaveResources":true,"toc":"right"},"seoDescription":"Production Kubernetes – a Helm 4 chart, ResourceQuota and LimitRange, RBAC with OIDC groups, Pod Security Admission, default-deny NetworkPolicy, PodDisruptionBudget, HPA, KEDA and scale to zero, Cluster Autoscaler and Karpenter, Prometheus Operator, ServiceMonitor and PrometheusRule, Argo CD, Extern","wordCount":3555,"doc":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Kubernetes basics","marks":[{"type":"link","attrs":{"href":"/en/articles/kubernetes-basics"}}]},{"type":"text","text":" ends with a working application in a cluster. Production starts with questions a demo never asks: who can change a deployment and how do you check it; what happens when an attacker takes over one pod; will the nightly node upgrade take down all replicas at once; how will the cluster cope with a \"dumplings at half price\" promotion, and what will it cost. This tutorial walks through those decisions using the dumpling-shop API – with manifests you can move into your own repository."}]},{"type":"callout","attrs":{"variant":"info","title":"In short"},"content":[{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Repeatability","marks":[{"type":"bold"}]},{"type":"text","text":": the application is a Helm chart with per-environment values, and the cluster state follows a Git repository (Argo CD). A manual "},{"type":"text","text":"kubectl edit","marks":[{"type":"code"}]},{"type":"text","text":" in production is debt that Argo CD will revert anyway."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Isolation in layers","marks":[{"type":"bold"}]},{"type":"text","text":": a namespace with quotas and Pod Security, RBAC for groups from the identity provider, a default-deny NetworkPolicy, secrets from an external manager."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Availability and scale","marks":[{"type":"bold"}]},{"type":"text","text":": a PodDisruptionBudget and replicas spread across zones, HPA/KEDA for pods, Cluster Autoscaler or Karpenter for nodes, alerts on symptoms (errors, latency) rather than CPU."}]}]}]}]},{"type":"callout","attrs":{"variant":"tip","title":"What you will build"},"content":[{"type":"paragraph","content":[{"type":"text","text":"A platform configuration repository: the "},{"type":"text","text":"pierogi-api","marks":[{"type":"code"}]},{"type":"text","text":" chart (a Deployment with probes and hardening, Service, HPA, PDB, NetworkPolicy, ServiceMonitor), namespace manifests with ResourceQuota and LimitRange, an RBAC role for a team, a default traffic block, an ExternalSecret, scaling the kitchen consumer by RabbitMQ queue length (KEDA), Prometheus alert rules and an Argo CD application. You can download the code as a ZIP."}]}]},{"type":"paragraph","content":[{"type":"text","text":"Prerequisites:","marks":[{"type":"bold"}]},{"type":"text","text":" "},{"type":"text","text":"Kubernetes basics","marks":[{"type":"link","attrs":{"href":"/en/articles/kubernetes-basics"}}]},{"type":"text","text":" (Deployment, Service, probes, HPA), "},{"type":"text","text":"Docker for developers","marks":[{"type":"link","attrs":{"href":"/en/articles/docker-for-developers"}}]},{"type":"text","text":", access to a cluster (managed: EKS, GKE, AKS – or a local one for practice)."}]},{"type":"stats","attrs":{"items":[{"value":"7","label":"security layers","hint":"namespace, quota, PSA, RBAC, NetworkPolicy, secrets, image scanning"},{"value":"2","label":"autoscaling levels","hint":"pods (HPA, KEDA) and nodes (CA, Karpenter)"},{"value":"0","label":"manual production changes","hint":"state from Git, Argo CD self-heal"},{"value":"1","label":"chart, many environments","hint":"`values.yaml` + `values-prod.yaml`"}]}},{"type":"diagram","attrs":{"kind":"mermaid","code":"flowchart LR\n  DEV[\"Developer<br/>code PR\"] --> CI[\"CI: tests, image build,<br/>Trivy scan, push to registry\"]\n  CI -->|\"PR: image.tag = 1.4.2\"| CFG[(\"Config repository<br/>charts + values-prod.yaml\")]\n  CFG -->|\"review + merge\"| ARGO[\"Argo CD<br/>compares Git with the cluster\"]\n  ARGO -->|\"sync: helm template + apply\"| K8S[\"Production cluster<br/>pierogi-prod\"]\n  K8S -.->|\"manual change = drift\"| ARGO\n  ARGO -.->|\"selfHeal: restores the Git state\"| K8S","caption":"GitOps: from a pull request to a change in the cluster"}},{"type":"heading","attrs":{"level":2,"id":"step-1-a-helm-chart-instead-of-copied-manifests"},"content":[{"type":"text","text":"Step 1. A Helm chart instead of copied manifests"}]},{"type":"paragraph","content":[{"type":"text","text":"The same manifests for dev, staging and production differ in a few values: image tag, replica count, resources, monitoring switched on. Helm (version 4 since November 2025) turns them into templates with values."}]},{"type":"codeGroup","attrs":{"title":"Chart: metadata, values and helpers"},"content":[{"type":"codeBlock","attrs":{"language":"yaml","filename":"charts/pierogi-api/Chart.yaml"},"content":[{"type":"text","text":"apiVersion: v2\nname: pierogi-api\ndescription: Pierogi API (NestJS) – Deployment, Service, HPA, PDB, NetworkPolicy and ServiceMonitor\ntype: application\nversion: 0.3.0 # chart version – bump on every chart change\nappVersion: \"1.0.0\" # default image tag"}]},{"type":"codeBlock","attrs":{"language":"yaml","filename":"charts/pierogi-api/values.yaml"},"content":[{"type":"text","text":"image:\n  repository: ghcr.io/pierogarnia/pierogi-api\n  tag: \"\" # empty = .Chart.AppVersion; in CI set an immutable tag or a digest\n  pullPolicy: IfNotPresent\n\nreplicaCount: 2 # ignored when autoscaling.enabled\n\nresources:\n  requests: { cpu: 100m, memory: 128Mi }\n  limits: { memory: 256Mi }\n\nenv:\n  PORT: \"3000\"\n  REDIS_URL: redis://redis:6379\n# name of a Secret with a DATABASE_URL key (created by External Secrets Operator)\ndatabaseSecret: pierogi-api-db\n\nautoscaling:\n  enabled: true\n  minReplicas: 2\n  maxReplicas: 10\n  targetCPUUtilizationPercentage: 70\n\npodDisruptionBudget:\n  enabled: true\n  maxUnavailable: 1\n\nnetworkPolicy:\n  enabled: true\n  # pods allowed to call the API (the web frontend and the Gateway namespace)\n  allowFromPodLabels: { app.kubernetes.io/name: pierogi-web }\n  allowFromNamespaceLabels: { kubernetes.io/metadata.name: gateway-system }\n\nmetrics:\n  serviceMonitor:\n    enabled: false # requires the Prometheus Operator CRDs (kube-prometheus-stack)\n    interval: 30s"}]},{"type":"codeBlock","attrs":{"language":"yaml","filename":"charts/pierogi-api/values-prod.yaml"},"content":[{"type":"text","text":"# helm upgrade --install api ./charts/pierogi-api -n pierogi-prod -f values-prod.yaml\nimage:\n  tag: \"1.4.2\"\nresources:\n  requests: { cpu: 250m, memory: 256Mi }\n  limits: { memory: 512Mi }\nautoscaling:\n  minReplicas: 3\n  maxReplicas: 20\nmetrics:\n  serviceMonitor:\n    enabled: true"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"charts/pierogi-api/templates/_helpers.tpl"},"content":[{"type":"text","text":"{{- define \"pierogi-api.name\" -}}\n{{- .Chart.Name -}}\n{{- end -}}\n\n{{- define \"pierogi-api.labels\" -}}\napp.kubernetes.io/name: {{ include \"pierogi-api.name\" . }}\napp.kubernetes.io/instance: {{ .Release.Name }}\napp.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}\napp.kubernetes.io/managed-by: {{ .Release.Service }}\nhelm.sh/chart: {{ printf \"%s-%s\" .Chart.Name .Chart.Version }}\n{{- end -}}\n\n{{- define \"pierogi-api.selectorLabels\" -}}\napp.kubernetes.io/name: {{ include \"pierogi-api.name\" . }}\napp.kubernetes.io/instance: {{ .Release.Name }}\n{{- end -}}"}]}]},{"type":"codeGroup","attrs":{"title":"Templates: Deployment, Service, HPA and PDB"},"content":[{"type":"codeBlock","attrs":{"language":"yaml","filename":"charts/pierogi-api/templates/deployment.yaml"},"content":[{"type":"text","text":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: {{ .Release.Name }}\n  labels: {{- include \"pierogi-api.labels\" . | nindent 4 }}\nspec:\n  {{- if not .Values.autoscaling.enabled }}\n  replicas: {{ .Values.replicaCount }}\n  {{- end }}\n  strategy:\n    rollingUpdate: { maxSurge: 25%, maxUnavailable: 0 }\n  selector:\n    matchLabels: {{- include \"pierogi-api.selectorLabels\" . | nindent 6 }}\n  template:\n    metadata:\n      labels: {{- include \"pierogi-api.selectorLabels\" . | nindent 8 }}\n      annotations:\n        # restart pods when the env values change\n        checksum/env: {{ toJson .Values.env | sha256sum }}\n    spec:\n      serviceAccountName: {{ .Release.Name }}\n      automountServiceAccountToken: false # the app does not talk to the Kubernetes API\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 1000\n        seccompProfile: { type: RuntimeDefault }\n      topologySpreadConstraints: # spread replicas across zones\n        - maxSkew: 1\n          topologyKey: topology.kubernetes.io/zone\n          whenUnsatisfiable: ScheduleAnyway\n          labelSelector:\n            matchLabels: {{- include \"pierogi-api.selectorLabels\" . | nindent 14 }}\n      containers:\n        - name: api\n          image: \"{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}\"\n          imagePullPolicy: {{ .Values.image.pullPolicy }}\n          ports:\n            - { name: http, containerPort: 3000 }\n          env:\n            {{- range $key, $value := .Values.env }}\n            - name: {{ $key }}\n              value: {{ $value | quote }}\n            {{- end }}\n            - name: DATABASE_URL\n              valueFrom:\n                secretKeyRef: { name: {{ .Values.databaseSecret }}, key: DATABASE_URL }\n          startupProbe:\n            httpGet: { path: /api/live, port: http }\n            periodSeconds: 2\n            failureThreshold: 30\n          livenessProbe:\n            httpGet: { path: /api/live, port: http }\n            periodSeconds: 10\n          readinessProbe:\n            httpGet: { path: /api/health, port: http }\n            periodSeconds: 5\n          resources: {{- toYaml .Values.resources | nindent 12 }}\n          lifecycle:\n            preStop:\n              sleep: { seconds: 5 }\n          securityContext:\n            allowPrivilegeEscalation: false\n            readOnlyRootFilesystem: true\n            capabilities: { drop: [\"ALL\"] }"}]},{"type":"codeBlock","attrs":{"language":"yaml","filename":"charts/pierogi-api/templates/service.yaml"},"content":[{"type":"text","text":"apiVersion: v1\nkind: Service\nmetadata:\n  name: {{ .Release.Name }}\n  labels: {{- include \"pierogi-api.labels\" . | nindent 4 }}\nspec:\n  selector: {{- include \"pierogi-api.selectorLabels\" . | nindent 4 }}\n  ports:\n    - { name: http, port: 3000, targetPort: http }\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: {{ .Release.Name }}\n  labels: {{- include \"pierogi-api.labels\" . | nindent 4 }}\nautomountServiceAccountToken: false"}]},{"type":"codeBlock","attrs":{"language":"yaml","filename":"charts/pierogi-api/templates/hpa-pdb.yaml"},"content":[{"type":"text","text":"{{- if .Values.autoscaling.enabled }}\napiVersion: autoscaling/v2\nkind: HorizontalPodAutoscaler\nmetadata:\n  name: {{ .Release.Name }}\n  labels: {{- include \"pierogi-api.labels\" . | nindent 4 }}\nspec:\n  scaleTargetRef: { apiVersion: apps/v1, kind: Deployment, name: {{ .Release.Name }} }\n  minReplicas: {{ .Values.autoscaling.minReplicas }}\n  maxReplicas: {{ .Values.autoscaling.maxReplicas }}\n  metrics:\n    - type: Resource\n      resource:\n        name: cpu\n        target: { type: Utilization, averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} }\n  behavior:\n    scaleDown: { stabilizationWindowSeconds: 300 }\n{{- end }}\n{{- if .Values.podDisruptionBudget.enabled }}\n---\n# Voluntary disruptions (node drain, cluster upgrade) may take down at most N pods at a time.\napiVersion: policy/v1\nkind: PodDisruptionBudget\nmetadata:\n  name: {{ .Release.Name }}\n  labels: {{- include \"pierogi-api.labels\" . | nindent 4 }}\nspec:\n  maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}\n  selector:\n    matchLabels: {{- include \"pierogi-api.selectorLabels\" . | nindent 6 }}\n{{- end }}"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Decisions worth highlighting:"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"An empty ","marks":[{"type":"bold"}]},{"type":"text","text":"image.tag","marks":[{"type":"code"}]},{"type":"text","text":" = ","marks":[{"type":"bold"}]},{"type":"text","text":"appVersion","marks":[{"type":"code"}]},{"type":"text","text":", and CI sets an immutable tag (a version or commit SHA). A "},{"type":"text","text":"latest","marks":[{"type":"code"}]},{"type":"text","text":" tag makes rollback impossible, because \"the previous version\" is the same string."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"checksum/env","marks":[{"type":"code"}]},{"type":"text","text":" in the pod annotations","marks":[{"type":"bold"}]},{"type":"text","text":" – changing a value in "},{"type":"text","text":"env","marks":[{"type":"code"}]},{"type":"text","text":" changes the checksum, so the Deployment performs a rolling update. Otherwise new variables would wait for an accidental restart."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"topologySpreadConstraints","marks":[{"type":"code"}]},{"type":"text","text":" spreads replicas across availability zones – a zone failure does not take the API down."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"automountServiceAccountToken: false","marks":[{"type":"code"}]},{"type":"text","text":" – the app does not talk to the Kubernetes API, so it gets no token an attacker could use."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"No CPU limit, but a memory limit","marks":[{"type":"bold"}]},{"type":"text","text":" – a CPU limit causes throttling even when cores are idle; memory is not compressible, so its limit protects the node. Set requests based on measurements."}]}]}]}]},"toc":[{"id":"step-1-a-helm-chart-instead-of-copied-manifests","text":"Step 1. A Helm chart instead of copied manifests","level":2,"locked":false},{"id":"step-2-namespaces-quotas-pod-security-and-rbac","text":"Step 2. Namespaces, quotas, Pod Security and RBAC","level":2,"locked":true},{"id":"step-3-networkpolicy-deny-by-default","text":"Step 3. NetworkPolicy: deny by default","level":2,"locked":true},{"id":"step-4-poddisruptionbudget-and-availability","text":"Step 4. PodDisruptionBudget and availability","level":2,"locked":true},{"id":"step-5-autoscaling-pods-and-nodes","text":"Step 5. Autoscaling: pods and nodes","level":2,"locked":true},{"id":"step-6-observability-measure-what-users-feel","text":"Step 6. Observability: measure what users feel","level":2,"locked":true},{"id":"step-7-gitops-with-argo-cd","text":"Step 7. GitOps with Argo CD","level":2,"locked":true},{"id":"costs-where-money-usually-leaks","text":"Costs: where money usually leaks","level":2,"locked":true},{"id":"pre-production-checklist","text":"Pre-production checklist","level":2,"locked":true},{"id":"common-mistakes","text":"Common mistakes","level":2,"locked":true},{"id":"check-yourself","text":"Check yourself","level":2,"locked":true},{"id":"what-next","text":"What next","level":2,"locked":true}],"locked":true,"paywall":null,"previewRatio":0.3,"totalBlocks":55,"visibleBlocks":12,"resources":[{"id":"6b0857b23c96f2d34d0b350f","type":"repo","provider":"github","url":"https://github.com/stefanprodan/podinfo","embedUrl":null,"title":"stefanprodan/podinfo","description":"Go microservice template for Kubernetes","author":"stefanprodan","thumbnailUrl":"https://opengraph.githubassets.com/1/stefanprodan/podinfo","durationSec":null,"lang":"en","topics":["microservices"],"techs":["go"],"tags":["cuelang","e2e-testing","gitops","golang","helm","kubernetes","testing","kustomize","microservice","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"github","publishedAt":"2018-01-05T14:19:59.000Z","popularity":73,"verifiedAt":"2026-11-26T10:58:37.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:50.215Z","updatedAt":"2026-11-26T16:00:50.215Z"},{"id":"6b0857c03c96f2d34d0b4365","type":"article","provider":"web","url":"https://learn.microsoft.com/en-us/azure/architecture/best-practices/auto-scaling","embedUrl":null,"title":"Autoscaling Guidance","description":"Review autoscaling guidance. Autoscaling is the process of dynamically allocating resources to match performance requirements.","author":"Microsoft Azure Architecture Center","thumbnailUrl":"https://learn.microsoft.com/en-us/media/open-graph-image.png","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["azure","cloud","performance"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":54,"verifiedAt":"2026-11-26T11:08:06.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"},{"id":"6b0857c83c96f2d34d0b49dc","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=ki6Y9HJl5-8","embedUrl":"https://www.youtube-nocookie.com/embed/ki6Y9HJl5-8","title":"Mastering Your Microservices With Observability","description":"It's hard to argue against observability being a good thing. However when you are working with a microservices architecture or other distributed system, it can prove extremely challenging to monitor or observe. Observability is often left as an afterthought for many organisations, leading to much…","author":"Modern Software Engineering","thumbnailUrl":"https://i.ytimg.com/vi/ki6Y9HJl5-8/hqdefault.jpg","durationSec":null,"lang":"en","topics":["microservices"],"techs":["general"],"tags":["system-design","distributed-systems","observability","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2024-05-08T18:00:32.000Z","popularity":60,"verifiedAt":"2026-11-26T11:13:38.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:10.095Z","updatedAt":"2026-11-26T16:01:10.095Z"},{"id":"6b0857ba3c96f2d34d0b3ea7","type":"podcast","provider":"apple-podcasts","url":"https://podcasts.apple.com/us/podcast/all-about-cedar-an-open-source-solution-for-fine/id915443155?i=1000739301604","embedUrl":"https://embed.podcasts.apple.com/us/podcast/id915443155?i=1000739301604","title":"All About Cedar, an Open Source Solution for Fine-Tuning Kubernetes Authorization","description":"Kubernetes has relied on role-based access control (RBAC) since 2017, but its simplicity limits what developers can express, said Micah Hausler, principal engineer at AWS, on The New Stack Makers. RBAC only allows actions; it can’t enforce conditions, denials, or attribute-based rules. Seeking a…","author":"The New Stack Podcast","thumbnailUrl":"https://is1-ssl.mzstatic.com/image/thumb/Podcasts112/v4/7e/e5/43/7ee54305-38f2-4a29-5014-45d8ac4831e3/mza_10106980059768264551.jpg/600x600bb.jpg","durationSec":973,"lang":"en","topics":["fine-tuning"],"techs":["general"],"tags":["podcast","cloud","kubernetes","ai"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"itunes","publishedAt":"2025-12-02T15:30:00.000Z","popularity":52,"verifiedAt":"2026-11-26T11:07:16.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:57.868Z","updatedAt":"2026-11-26T16:00:57.868Z"},{"id":"6b0857c43c96f2d34d0b46ab","type":"book","provider":"openlibrary","url":"https://openlibrary.org/works/OL21338519W","embedUrl":null,"title":"Kubernetes Patterns","description":"","author":"Bilgin Ibryam, Roland Huß","thumbnailUrl":"https://covers.openlibrary.org/b/id/15273476-L.jpg","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["book","cloud","kubernetes"],"price":"paid","featured":false,"featuredOrder":0,"packageName":null,"source":"openlibrary","publishedAt":"2019-01-01T00:00:00.000Z","popularity":44,"verifiedAt":"2026-11-26T11:00:08.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:07.480Z","updatedAt":"2026-11-26T16:01:07.480Z"},{"id":"6b0857bf3c96f2d34d0b426f","type":"article","provider":"web","url":"https://aws.amazon.com/builders-library/fairness-in-multi-tenant-systems","embedUrl":null,"title":"Fairness in multi-tenant systems | AWS Builder Center","description":"How Amazon keeps shared, multi-tenant services fair, using throttling, quotas, and workload isolation so one tenant's traffic can't starve others.","author":"Amazon Builders' Library","thumbnailUrl":"https://builder.aws.com/assets/og-hiXAX-on.png","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["aws","distributed-systems","cloud"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":"2020-11-13T12:00:00.000Z","popularity":65,"verifiedAt":"2026-11-26T11:25:45.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"}],"challenges":[{"id":"6b093dc291bd8fbaf2a0c8d8","slug":"payment-circuit-breaker","title":"Circuit breaker for a payment gateway","summary":"A circuit breaker with closed, open and half-open states, an injected clock, a trial-success threshold and a business-error filter – so a payment gateway outage does not take the whole shop down.","servedLang":"en","availableLangs":["pl","en"],"kind":"code","category":"architecture","status":"published","difficulty":"hard","topics":["circuit-breaker","microservices"],"techs":["typescript","javascript","python","dotnet","java","go"],"tags":["circuit-breaker","resilience","fault-tolerance","state-machine","payments"],"languages":["typescript","javascript","python","csharp","java","go"],"questionCount":null,"xp":40,"stats":{"attempts":0,"solves":0,"solutions":0,"comments":0},"solveRate":null,"publishedAt":"2026-11-27T08:22:26.251Z"}],"attachments":[],"hasCode":true,"repoUrl":null,"series":[],"prev":null,"next":null,"featured":false,"authorCard":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","headline":"Wzorce projektowe · Architektura · AI i LLM","community":false,"reputation":{"points":3900,"level":{"key":"mentor","label":"Mentor"}},"articles":104,"skills":[{"key":"typescript","title":"TypeScript","level":5,"levelLabel":"Authority","articles":90},{"key":"dotnet","title":".NET","level":5,"levelLabel":"Authority","articles":61},{"key":"python","title":"Python","level":5,"levelLabel":"Authority","articles":59},{"key":"java","title":"Java","level":5,"levelLabel":"Authority","articles":46}]}}