intermediate 2 min answer

A platform team must ensure services meet security and observability requirements. Should that be a gate or a guardrail?

hasuraguardrailsgatesdefaultsenforcement
Show the full answer Hide the answer

The distinction

A gate blocks a change that does not comply. A guardrail makes compliance the default and non-compliance require deliberate effort.

The guardrail is strictly better where it is available, because it removes the requirement from the team's attention entirely: a template that produces a service with authentication, logging, metrics and a health check already present means nobody has to remember them.

When a gate is still needed

  • When the requirement cannot be satisfied by a default, because it depends on what the service does — a data classification decision, a threat model, an authorisation policy.
  • When drift is possible after the default was applied, so a periodic or pipeline check confirms it still holds.
  • When the consequence of non-compliance is severe enough that a deliberate bypass must be blocked rather than merely made difficult.

The design that combines them

Guardrails for everything mechanical, gates for the small set that requires judgement, and the gate's pass condition stated so it can be automated later.

Specifically: the template provides the observability, the pipeline check confirms it is still present, and a human reviews only the things a check cannot evaluate.

Why gates alone fail

A gate is a control on behaviour; a guardrail changes what the easiest behaviour is. Gates accumulate, lengthen lead time, and are eventually routed around — and a control that is routed around provides less assurance than none, because it exists on paper and not in the system.

They also produce an adversarial relationship: the platform team becomes the group that blocks, which undermines the voluntary adoption everything else depends on.

The measurement

The proportion of services compliant without any gate having fired. A high number means the guardrails are working; a low number means the gate is doing the work, which is expensive and fragile.

That single metric tells a platform team whether to invest in a better default or in a stricter check — and it almost always points at the default.