push site config to the load balancers

This block is part of the nginx group and was last modified in core v15.0.0.

push site config to the load balancers v15.0.0

Replace the live site config and reload nginx, per node. Gated on a passing nginxsite_check over these exact bytes for every target node.

In pins 4 + flow
  • flow
    flow
  • Site required
    value

    The site name : becomes .conf on the fleet.

  • Site config required
    value

    The nginx site config : the exact bytes the checks passed on.

  • Load balancers required
    array

    Where to write. ONE node on a shared-fs fleet; every node on an independent fleet.

  • Check results required
    array

    The results array from nginxsite_check. Every target node needs a passing entry with a matching checksum.

Out pins 7 + flow
  • flow
    flow
  • Success
    condition

    True when every target node applied the config.

  • Site
    value

    The site that was pushed.

  • Results
    array

    Per node: name, host, ok, output, exit_code.

  • Applied count
    number

    How many nodes applied it.

  • Node count
    number

    How many nodes were written to.

  • Checksum
    value

    sha256 of the pushed bytes.

  • Error
    value

    Why the push was refused, or which nodes did not apply.

Replaces the live nginx site config and reloads, per node, through the fleet's own validated contract (lb-push/lb-apply): the far side re-validates against its full live tree before promoting, promotes atomically, re-runs nginx -t and rolls back if the tree breaks : a config that fails validation never replaces a live one. The block-side gate is the point: push refuses to run unless the checks pin carries a PASSING nginxsite_check result for every node in ITS OWN nodes list, for this site, with a checksum matching these exact bytes. A validation failure anywhere leaves every node untouched, including the ones that would have accepted it. FLEET SHAPES: on a shared-filesystem fleet (live configs on a filesystem all nodes mount, watchers converging : the rual a-cluster LB trio is this shape) pass exactly ONE node here: the shared fs distributes, the other nodes' watchers validate and reload within seconds, and pushing the same bytes N times only reloads N times for one change. Check may and should still fan out to every node. On an independent fleet, list every node and read the per-node results. Past the gate the push is deliberately NOT atomic across nodes: each node validates and swaps on its own, and a node that refuses keeps serving what it had. nginxsite_status answers whether the fleet agrees afterwards.

deploy nginx config
push site config
apply site config

A typical wiring for push site config to the load balancers: a function trigger starts the flow; value feeds the site pin; value feeds the config pin; with values feeds the nodes pin; with values feeds the checks pin; the flow out pin feeds debug.

Studio canvas example for the push site config to the load balancers block: typical wiring for push site config to the load balancers.

Version history

Introduced in v15.0.0.


Back to nginx Return to the main group to view all sub-groups Back to Load balancers Return to the group to view all blocks within this group