Skip to content

Conversation

ilkka-ollakka
Copy link
Contributor

@ilkka-ollakka ilkka-ollakka commented Jun 8, 2025

Description

Add lock in nginx level that only one request gets in if cache is miss and others wait that one request at max of 10s to get response and populate cache, which is served to other requests hitting the same cache-key.

Alternative approach to #2809

What type of Pull Request is this?

  • Bug Fix
  • Enhancement
  • Plumbing / Internals / Dependencies
  • Refactor

Does this PR change settings or dependencies, or break something?

  • This PR changes or adds default settings, configuration, or .env values
  • This PR changes or adds dependencies
  • This PR introduces other breaking changes

Details of breaking or configuration changes (if any of above checked)

Nginx caching rules are changed, to prevent huge amount of identical requests to cause load on instance

Documentation

  • New or amended documentation will be required if this PR is merged
  • I have created a matching pull request in the Documentation repository
  • I intend to create a matching pull request in the Documentation repository after this PR is merged

Tests

  • My changes do not need new tests
  • All tests I have added are passing
  • I have written tests but need help to make them pass
  • I have not written tests and need help to write them

@ilkka-ollakka ilkka-ollakka changed the title nginx: add proxy_cache_lock, so we wait one request to populate cache nginx: add proxy_cache_lock, so we wait one request to populate cache if there is ongoing for that cache-key Jun 8, 2025
@ilkka-ollakka ilkka-ollakka changed the title nginx: add proxy_cache_lock, so we wait one request to populate cache if there is ongoing for that cache-key nginx: add proxy_cache_lock, so we wait one request to populate cache if there is one ongoing for that cache-key Jun 21, 2025
@hughrun
Copy link
Contributor

hughrun commented Jul 5, 2025

This looks like it should work to me. @WesleyAC @mouse-reeve thoughts?

@hughrun hughrun added the plumbing PR for internal processes or background jobs label Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plumbing PR for internal processes or background jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants