chore(authz): prove stacked optimizations at policy scale - #3993
Draft
strantalis wants to merge 1 commit into
Draft
chore(authz): prove stacked optimizations at policy scale#3993strantalis wants to merge 1 commit into
strantalis wants to merge 1 commit into
Conversation
Signed-off-by: strantalis <strantalis@virtru.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Contributor
|
Contributor
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.
Proposed Changes
Add the large-policy concurrency coverage from #3983 on top of the authorization performance stack. #3983 remains open against main for comparison; this PR validates the optimized implementation and publishes the same latency statistics in the GitHub Actions summary.
The fixture contains 6,011 subject mappings and 6,000 resource mappings. Each request asks the public V2 endpoint for three resource decisions, with synchronized concurrency levels of 1, 10, 25, and 50. Fixture creation is outside the measured operation. Every response must match its peers and contain the expected PERMIT decisions.
The fixture and summary reporting are copied from #3983 at a5ae1c5. The stack copy tightens the maximum duration from five seconds to 500 ms per request and separates that gate from a minimum five-second timeout. This lets regressions report completed-request timings while still failing the gate.
Layer 7 of 7, based on #3991. This is a comparison copy of #3983, not independent coverage that needs to be merged twice. Reconcile the duplicate test changes when one version lands.
Checklist
Testing Instructions
Run each concurrency tag in a separate process when using PLATFORM_IMAGE=DEBUG. Reusing the inline platform across scenarios can retain authentication state. CI uses the containerized platform.
CUKES_LOG_HANDLER=console PLATFORM_IMAGE=DEBUG go test ./tests-bdd -v --tags=cukes --godog.tags=@concurrency-50 --count=1 features/authorization-v2-subject-mapping-performance.featureLocal results with the optimized stack, one process per concurrency level:
Every optimized case passed its expected-decision assertions with zero failed requests. As a control, a temporary Go overlay restored the original SQL lookup from the stack base, 5173b4c, while retaining the same test and other stack changes. At 50 concurrent requests, that control recorded p95 3.975 s and maximum 4.182 s, with zero request errors or response inconsistencies. It failed the 500 ms gate as expected. This isolates the targeted-query improvement; it is not a benchmark of every optimization independently.
Validation:
make fmt,cd tests-bdd && go test ./... -race, lint for the new tests-bdd changes,actionlint .github/workflows/checks.yaml, and SDK README code-block tests passed.make lintremains blocked by the configured invalid Buf API token. The stack's existing broad lint/dependency findings are outside this test-only copy.make testwas rerun with Colima configured. The round-trip suite failed because its required local platform at127.0.0.1:8080was not running; no other package was reported failed.