Skip to content

Gateway: avoid a full role check per node credential check #139

Open

Description

@samuelmbabhazi

Since M2.3g1b, every gateway authentication (each RPC, and at least once per second per stream) opens a tenant transaction. That transaction runs assertTenantDatabaseRole, a catalog query.

Scope

  • Measure the cost with a benchmark of 100 connected nodes.
  • Then propose a safe optimization: for example a short-lived cache of the role check result per connection, invalidated on error. The check must never be skipped for a new connection.

Acceptance

A benchmark before and after, and no weakening of the checks listed in SPEC 4.

Activity

  1. added
    enhancement
    priority:P3
    on Nov 5, 2026
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

    enhancementpriority:P3track:control-plane

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions