Add Grid distributed quota demo - #20
Draft
nerdalert wants to merge 1 commit into
Draft
Conversation
Demonstrate three independent, authenticated-subject token quotas through one shared endpoint and two consumer gateways. Package the Grid qualification topology, operational documentation, and reusable demo launcher without relying on client-controlled tenant headers. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
This was referenced Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a runnable Grid demo for three independent, subject-keyed distributed token quotas through one shared endpoint.
application-a,application-b, andapplication-cauthenticate with Basic Auth against the same listener on either consumer gateway. Their verified identities select independent Valkey-backed quota buckets, while admitted requests use one Grid overlay spanning west, central, and east providers.What it demonstrates
Architecture
The request path is:
Praxis publishes the verified username as private request-local
AuthenticatedIdentity. Praxis AI consumes that trusted identity withkey: authenticated_subjectand hashes it into an opaque quota key. Grid remains responsible only for provider eligibility and selection after admission.The identity contract is not tied to Basic Auth. JWT/OIDC/OAuth-backed authentication can publish the same identity type for reuse by the quota filter.
Contents
Adds
demos/grid-distributed-quota/with:run.shentry point backed by Grid's first-class token-rate-limit qualification;The repository index and shared Grid demo launcher are also updated.
Quota contract
Admission reserves configured tokens before provider routing. The enforced invariant is:
Actual token usage is settled after the response and retained as accounting evidence. A response may use more than its estimate without representing an admission error. The demo does not implement or claim a soft quota.
Security boundaries
Cross-repository dependencies
Landing order is intentional:
Related to praxis-proxy/ai#121 and praxis-proxy/grid#101.
Supersedes #19.
Validation
The underlying Grid qualification passed twice from fresh Kind environments, 9/9 scenarios each, with automatic teardown. Demo shell syntax, ShellCheck, Forge structure, documentation, and diff checks also passed.
This remains draft until the dependency chain lands, exact released versions/image provenance are documented, and the demo is rerun from clean upstream checkouts without local Cargo patches.