Skip to content

Comments

WIP: feat: Add Redis-based workspace stream quota for WebRTC sessions#2025

Open
rafel-roboflow wants to merge 16 commits intomainfrom
feat/dg-232-set-rate-limit-to-10-concurrent-streams-and-update
Open

WIP: feat: Add Redis-based workspace stream quota for WebRTC sessions#2025
rafel-roboflow wants to merge 16 commits intomainfrom
feat/dg-232-set-rate-limit-to-10-concurrent-streams-and-update

Conversation

@rafel-roboflow
Copy link
Contributor

@rafel-roboflow rafel-roboflow commented Feb 20, 2026

  • Limit concurrent WebRTC streams per workspace (default: 10)
  • Return HTTP 429 when quota exceeded
  • Add heartbeat endpoint for Modal workers to refresh session TTL

What does this PR do?

Related Issue(s):

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other:

Testing

  • I have tested this change locally
  • I have added/updated tests for this change

Test details:
I put max connections=3;

  • easy case: one, two, three; one after each.
  • case 1: one, two, wait 2 min, retry 3 ... is blocked; wait 8 minutes, retry 3... is blocked.
  • case 2: one, two, close two, open two, ... 3rd is blocked.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

- Limit concurrent WebRTC streams per workspace (default: 10)
- Return HTTP 429 when quota exceeded
- Add heartbeat endpoint for Modal workers to refresh session TTL
@PawelPeczek-Roboflow
Copy link
Collaborator

@rafel-roboflow - sorry, will not be added to todays release

…-set-rate-limit-to-10-concurrent-streams-and-update
…-update' of github.com:roboflow/inference into feat/dg-232-set-rate-limit-to-10-concurrent-streams-and-update
@codeflash-ai
Copy link
Contributor

codeflash-ai bot commented Feb 20, 2026

⚡️ Codeflash found optimizations for this PR

📄 153% (1.53x) speedup for with_route_exceptions_async in inference/core/interfaces/http/error_handlers.py

⏱️ Runtime : 538 microseconds 212 microseconds (best of 5 runs)

A dependent PR with the suggested changes has been created. Please review:

If you approve, it will be merged into this PR (branch feat/dg-232-set-rate-limit-to-10-concurrent-streams-and-update).

Static Badge

@rafel-roboflow rafel-roboflow marked this pull request as ready for review February 24, 2026 08:26
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.

2 participants