Skip to content

feat: Add support for returning backoff when stressed#1560

Draft
MikeGoldsmith wants to merge 14 commits intomainfrom
mike/backpressure
Draft

feat: Add support for returning backoff when stressed#1560
MikeGoldsmith wants to merge 14 commits intomainfrom
mike/backpressure

Conversation

@MikeGoldsmith
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith commented May 14, 2025

Which problem is this PR solving?

Adds support for Refinery to respond to new telemetry requests with back pressure when stress relief has been activated.

For HTTP requests, Refinery will respond with HTTP status code 429 (TooManyRequests)
For gRPC requests, Refinery will respond with gRPC error code 8 (ResourceExhausted)

Short description of the changes

  • Add StressRelief config option DisableBackPressure
  • Add ErrBackPressure error
  • When handling incoming data (event, batch or OTLP) check if the collector processed is stressed, if yes, then return new error
  • Check for new error at request handler entry point, and return appropriate error
  • Add unit tests to verify behaviour

@MikeGoldsmith MikeGoldsmith changed the title feat: Add support for returning backpressure when stressed feat: Add support for returning backoff when stressed May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply back pressure to upstream service when Refinery is stressed

1 participant