# Webhooks

{/* vale off */}

Send events to a microVM that wakes and responds in milliseconds, then shuts down until the next event.

<ValueCards>
  <ValueCard title="Cold boots and responds in milliseconds" metric="cold start < 10 ms">
    No warm instance waiting for a delivery that may not come; the event itself is what starts the handler.
  </ValueCard>
  <ValueCard title="Costs nothing between events" metric="zero idle cost">
    Between deliveries the handler isn't running.
    Endpoints that fire a few times a day stop being a standing bill.
  </ValueCard>
  <ValueCard title="Absorb event storms" metric="autoscale in < 10 ms">
    When a provider replays a backlog, the service group [adds instances](/features/autoscale) in milliseconds and [balances](/features/load-balancing) across them.
  </ValueCard>
</ValueCards>

<FlowDiagram caption="Events arrive, sleeping handlers wake in milliseconds to write to your backends, then shut down until the next one.">
  <FlowBox title="Event sources">
    Stripe, GitHub, your own services
  </FlowBox>
  <FlowArrow accent label="balanced" lines={3} />
  <FlowGroup
    title="Service group"
    titleNote="webhook handlers"
    footnote="Instances appear on the event and disappear after it."
  >
    <FlowStackItem label="handler" chip="handling event" active dot />
    <FlowStackItem label="handler" chip="handling event" active dot />
    <FlowStackItem label="handler" chip="scaled to zero" dot />
  </FlowGroup>
  <FlowArrow label="routes to" />
  <FlowStack>
    <FlowStackItem label="database" />
    <FlowStackItem label="queue" />
    <FlowStackItem label="object storage" />
  </FlowStack>
</FlowDiagram>

---

## Under the hood

The platform features this use case is built on.

<FeatureTable>
  <FeatureRow title="Scale-to-zero" href="/features/scale-to-zero">
    The VM only runs while it is actively serving a request.
  </FeatureRow>
  <FeatureRow title="Autoscale" href="/features/autoscale">
    The service group can add instances in milliseconds to deal with event storms.
  </FeatureRow>
  <FeatureRow title="Load balancing" href="/features/load-balancing">
    Distributes incoming events across the instances in the service group.
  </FeatureRow>
</FeatureTable>

<UseCaseCta
  title="Deploy your first webhook now"
  guideHref="/guides/github-webhook-node"
  guideLabel="Webhooks guide"
>
  Sign up to Unikraft Cloud and follow the guide to deploy your first webhook
</UseCaseCta>

{/* vale on */}
