Skip to content

[Feature] Hot-reload apis.yaml without restarting the gateway (nginx-style reload) #2966

@1-2-3

Description

@1-2-3

Add a way to reload the YAML configuration (apis.yaml and files referenced via include:) while Membrane keeps running, similar to nginx -s reload. Today, any change to routes, targets, plugins, or included fragments appears to require a full process restart (membrane.sh / membrane.cmd), which causes downtime and drops in-flight requests.

Proposed behavior

Reload should:

  • Re-read the active configuration source (default conf/apis.yaml, or the path passed via -c)
  • Resolve include: recursively (same semantics as startup)
  • Validate the new configuration before applying it (schema/parse errors must not take down the running router)
  • Apply the new routing/interceptor graph without stopping the JVM
  • Emit a clear log line on success or failure (e.g. Configuration reloaded from ... / Reload failed: ...)

Reload should ideally (stretch goals):

  • Drain or finish in-flight exchanges on removed/changed listeners where possible
  • Leave unchanged endpoints stable (minimal blast radius)
  • Support rollback to the last known-good config if apply fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions