Skip to content

Fix request filtering for service stats#2678

Merged
jvstme merged 1 commit intomasterfrom
issue_2662_service_stats_request_filtering
May 22, 2025
Merged

Fix request filtering for service stats#2678
jvstme merged 1 commit intomasterfrom
issue_2662_service_stats_request_filtering

Conversation

@jvstme
Copy link
Copy Markdown
Collaborator

@jvstme jvstme commented May 21, 2025

Instead of relying on status codes or other
heuristics, have Nginx log a flag for each request
forwarded, or intended to be forwarded, to a
service replica. Use these flags to determine
which requests to include in service stats.

This reliably excludes requests that are
terminated by Nginx and hence don't add load to
replicas. These include HTTP to HTTPS redirects,
unauthenticated requests, and requests that
violate rate or body size limits.

Fixes #2662

Instead of relying on status codes or other
heuristics, have Nginx log a flag for each request
forwarded, or intended to be forwarded, to a
service replica. Use these flags to determine
which requests to include in service stats.

This reliably excludes requests that are
terminated by Nginx and hence don't add load to
replicas. These include HTTP to HTTPS redirects,
unauthenticated requests, and requests that
violate rate or body size limits.
@jvstme jvstme requested a review from r4victor May 21, 2025 17:29
@jvstme jvstme merged commit f36ca9d into master May 22, 2025
25 checks passed
@jvstme jvstme deleted the issue_2662_service_stats_request_filtering branch May 22, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Unauthorized requests can trigger service scaling

2 participants