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

Fight against the bursts #365

Open
CharlesNepote opened this issue Jul 1, 2024 · 0 comments
Open

Fight against the bursts #365

CharlesNepote opened this issue Jul 1, 2024 · 0 comments
Labels

Comments

@CharlesNepote
Copy link
Member

CharlesNepote commented Jul 1, 2024

Some buggy apps/tools are making dozens of requests of the same URL in the same second. Unfortunately, the cache does not seem to work in this case (nginx probably don't have time to fill the cache).
Eg. (look at the [MISS] at the end of the lines, telling that the cache is not used):

xxx.xxx.xxx.xxx - - [11/Jun/2024:19:14:05 +0000] "GET /api/v3/product/https://app.adjust.com/6iofau3/?lc=de&tags_lc=de&fields=product_name%2Cbrands%2Cimage_front_url%2Cnutriments%2Ccode%2Cproduct_quantity%2Cserving_quantity&app_name=MCI+-+Personal+Training+AI&app_version=1.1.990+1&app_platform=iOS&comment=use+website+for+contact+and+more+information HTTP/1.1" 404 689 "-" "- MCI - Personal Training AI - 1.1.990 1 - iOS - https://mcisolutions.de - use website for contact and more information" "-" MISS [1.720]
xxx.xxx.xxx.xxx - - [11/Jun/2024:19:14:05 +0000] "GET /api/v3/product/https://app.adjust.com/6iofau3/?lc=de&tags_lc=de&fields=product_name%2Cbrands%2Cimage_front_url%2Cnutriments%2Ccode%2Cproduct_quantity%2Cserving_quantity&app_name=MCI+-+Personal+Training+AI&app_version=1.1.990+1&app_platform=iOS&comment=use+website+for+contact+and+more+information HTTP/1.1" 404 689 "-" "- MCI - Personal Training AI - 1.1.990 1 - iOS - https://mcisolutions.de - use website for contact and more information" "-" MISS [1.844]
xxx.xxx.xxx.xxx - - [11/Jun/2024:19:14:05 +0000] "GET /api/v3/product/https://app.adjust.com/6iofau3/?lc=de&tags_lc=de&fields=product_name%2Cbrands%2Cimage_front_url%2Cnutriments%2Ccode%2Cproduct_quantity%2Cserving_quantity&app_name=MCI+-+Personal+Training+AI&app_version=1.1.990+1&app_platform=iOS&comment=use+website+for+contact+and+more+information HTTP/1.1" 404 689 "-" "- MCI - Personal Training AI - 1.1.990 1 - iOS - https://mcisolutions.de - use website for contact and more information" "-" MISS [1.936]
xxx.xxx.xxx.xxx - - [11/Jun/2024:19:14:05 +0000] "GET /api/v3/product/https://app.adjust.com/6iofau3/?lc=de&tags_lc=de&fields=product_name%2Cbrands%2Cimage_front_url%2Cnutriments%2Ccode%2Cproduct_quantity%2Cserving_quantity&app_name=MCI+-+Personal+Training+AI&app_version=1.1.990+1&app_platform=iOS&comment=use+website+for+contact+and+more+information HTTP/1.1" 404 689 "-" "- MCI - Personal Training AI - 1.1.990 1 - iOS - https://mcisolutions.de - use website for contact and more information" "-" MISS [1.784]
xxx.xxx.xxx.xxx - - [11/Jun/2024:19:14:05 +0000] "GET /api/v3/product/https://app.adjust.com/6iofau3/?lc=de&tags_lc=de&fields=product_name%2Cbrands%2Cimage_front_url%2Cnutriments%2Ccode%2Cproduct_quantity%2Cserving_quantity&app_name=MCI+-+Personal+Training+AI&app_version=1.1.990+1&app_platform=iOS&comment=use+website+for+contact+and+more+information HTTP/1.1" 404 689 "-" "- MCI - Personal Training AI - 1.1.990 1 - iOS - https://mcisolutions.de - use website for contact and more information" "-" MISS [1.828]
xxx.xxx.xxx.xxx - - [11/Jun/2024:19:14:05 +0000] "GET /api/v3/product/https://app.adjust.com/6iofau3/?lc=de&tags_lc=de&fields=product_name%2Cbrands%2Cimage_front_url%2Cnutriments%2Ccode%2Cproduct_quantity%2Cserving_quantity&app_name=MCI+-+Personal+Training+AI&app_version=1.1.990+1&app_platform=iOS&comment=use+website+for+contact+and+more+information HTTP/1.1" 404 689 "-" "- MCI - Personal Training AI - 1.1.990 1 - iOS - https://mcisolutions.de - use website for contact and more information" "-" MISS [2.432]

In theory, we can manage this in nginx with the proxy_cache_lock directive. There's an interesting article about it.
It might be used in conjonction with proxy_cache_use_stale updating. See:

It should be easy to test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants