Open Bug 1880534 Opened 5 months ago Updated 3 months ago

Network limiter doesn't throttle websocket connections

Categories

(Core :: Networking: WebSockets, defect, P2)

Firefox 122
defect

Tracking

()

UNCONFIRMED

People

(Reporter: marsal2000, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Steps to reproduce:

Open site with streaming through websocket instead of webrtc
Open Devtools
Navitage to Network
Enable Throttling

Actual results:

The network did not get throttled on the page, no matter the settings

Expected results:

The websocket traffic should've been throttled

The Bugbug bot thinks this bug should belong to the 'Core::Networking: WebSockets' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking: WebSockets
Product: Firefox → Core
Whiteboard: [necko-triaged][necko-priority-new]
Severity: -- → S3
Priority: -- → P2

@valentin - do you know how we're doing devtools throttling?

Flags: needinfo?(valentin.gosu)

The thottling happens in devtools here.
While the initial channel to deal with the WS upgrade would be throttled, websocket channels might not.

I think we need additional work to support this for websockets.
With downloads, we probably need to change WebSocketChannel::OnInputStreamReady so we don't read more than allowed.
With uploads either WebSocketChannel::OnOutputStreamReady or WebSocketChannel::EnqueueOutgoingMessage

Flags: needinfo?(valentin.gosu)

We might have a similar problem for WebTransport as well.

Whiteboard: [necko-triaged][necko-priority-new] → [necko-triaged]
You need to log in before you can comment on or make changes to this bug.