Skip to content

evaluation order of cluster sub parts after config reload #952

Closed

Description

@iceisfun

it seems like when items are re-ordered in the [clusters] section and a configuration is reloaded the new order is not honored.

would it be unreasonable to add a "order" to frontends, or evaluate them in config order after a config reload?

Activity

  1. Keksoj commented on Jul 25, 2023

    @Keksoj

    I'm curious: what does your config look like, before and after this reordering?

  2. FlorentinDUBOIS commented on May 4, 2026

    @FlorentinDUBOIS
    Collaborator

    @iceisfun friendly ping on @Keksoj's question above — could you share the [clusters] config snippet (or the relevant frontend entries) before and after reordering, plus the matching reload command? With those we can repro the eval-order behavior you saw and decide whether to add an explicit ordering knob or fix the reload pipeline.

  3. FlorentinDUBOIS commented on Sep 29, 2026

    @FlorentinDUBOIS
    Collaborator

    The explicit ordering asked for here exists: every frontend takes position = "PRE" | "TREE" | "POST" (bin/config.toml, command.proto#L899). Router::lookup tries PRE rules, then the routing tree, then POST rules, first match wins within PRE and POST (lib/src/router/mod.rs). TREE rules (the default) resolve by specificity — exact hostname, then wildcard, longest path prefix — so reordering [clusters] does not change them.

    #1681 documents this, including the current limits: a configuration reload does not re-add or update an existing frontend and does not reorder PRE/POST rules, and a newly started worker replays frontends in key order (doc/configure.md). To pin an order, put the frontends that must win first in PRE and fallbacks in POST.

    Closing as answered by position; please reopen with a config sample if a case is not covered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions