Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy: always count route lookup failures #3341

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

AlexanderYastrebov
Copy link
Member

@AlexanderYastrebov AlexanderYastrebov commented Dec 11, 2024

Remove debug mode check for clarity and because
other metrics are updated without checking for debug mode.

@AlexanderYastrebov AlexanderYastrebov added the minor no risk changes, for example new filters label Dec 11, 2024
Remove debug mode check for clarity and because
other metrics are updated without checking for debug mode.

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
@AlexanderYastrebov AlexanderYastrebov force-pushed the proxy/IncRoutingFailures-debug branch from 88cca00 to 2a86919 Compare December 11, 2024 19:46
@szuecs
Copy link
Member

szuecs commented Dec 11, 2024

I didn't check but if you create 404 counts for unknown hosts then it's a DoS vector for memory usage.
If it's a single counter without host cardinality then it's fine.

@AlexanderYastrebov
Copy link
Member Author

AlexanderYastrebov commented Dec 12, 2024

I didn't check but if you create 404 counts for unknown hosts then it's a DoS vector for memory usage.
If it's a single counter without host cardinality then it's fine.

Yes, this metric does not have client-controlled dimensions (like hostname):

$ bin/skipper -inline-routes='Host("foo.test") -> <shunt>' -metrics-flavour=prometheus
[APP]INFO[0000] Expose metrics in prometheus format
...
$ curl localhost:9090
Not Found
$ curl -s localhost:9911/metrics | grep skipper_route_error_total
# HELP skipper_route_error_total The total of route lookup errors.
# TYPE skipper_route_error_total counter
skipper_route_error_total 1

@MustafaSaber
Copy link
Member

👍

1 similar comment
@AlexanderYastrebov
Copy link
Member Author

👍

@AlexanderYastrebov AlexanderYastrebov merged commit f5afdba into master Dec 12, 2024
14 checks passed
@AlexanderYastrebov AlexanderYastrebov deleted the proxy/IncRoutingFailures-debug branch December 12, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor no risk changes, for example new filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants