Skip to content

Conversation

@dbobrenko
Copy link
Collaborator

@dbobrenko dbobrenko commented Feb 5, 2025

Changes

  • Add API scoring queue (FIFO), used to prevent validator DDOS with scoring requests in case of huge API activity.
  • In case of failed scoring request, same response retries to query validator up to 3 times.
  • Add new env variables:
    • SCORING_RATE_LIMIT_SEC, defaults to 0.5: Delay in seconds between scoring requests, applies when queue is not empty or size > SCORING_QUEUE_API_THRESHOLD.
    • SCORING_QUEUE_API_THRESHOLD, defaults to 5: Scoring queue size threshold when rate-limit start to kick in.

@dbobrenko dbobrenko marked this pull request as draft February 5, 2025 11:52
@dbobrenko dbobrenko self-assigned this Feb 6, 2025
@dbobrenko dbobrenko changed the title [WIP] Add scoring queue Add API scoring queue Feb 6, 2025
@dbobrenko dbobrenko marked this pull request as ready for review February 6, 2025 08:24
@dbobrenko dbobrenko merged commit 9703236 into staging Feb 7, 2025
1 check passed
@dbobrenko dbobrenko deleted the feature/SN1-394-scoring-queue branch July 3, 2025 10:01
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.

3 participants