Skip to content

Reduce size of frames sent to websockets to 10MB#5052

Closed
mrocklin wants to merge 1 commit intodask:mainfrom
mrocklin:frame-split-size
Closed

Reduce size of frames sent to websockets to 10MB#5052
mrocklin wants to merge 1 commit intodask:mainfrom
mrocklin:frame-split-size

Conversation

@mrocklin
Copy link
Member

This also forces us to thread a keyword down through from to_frames to frame_split_size.

Websockets are often used in situations where large frames are not allowed. This restricts the size of any frame sent through the websocket protocol to 10MB.

This isn't a great solution for a few reasons:

  1. It's a fixed number, rather than something configurable.
  2. It's somewhat redundant with the distributed.comm.shard config value (I didn't want all users of websockets to have to set this value)

But the work of threading through the keyword is probably valuable, and maybe it helps to inspire a better solution.

This also forces us to thread a keyword down through from to_frames to
frame_split_size.
@mrocklin
Copy link
Member Author

cc @ian-r-rose

@mrocklin
Copy link
Member Author

Maybe we should have a different shard default for websockets instead. It would be nice to let people increase this limit if they wanted.

@ian-r-rose
Copy link
Collaborator

Maybe we should have a different shard default for websockets instead. It would be nice to let people increase this limit if they wanted.

I would probably appreciate this option, even if it's pretty esoteric.

@mrocklin
Copy link
Member Author

@ian-r-rose do you want to take this PR over?

@ian-r-rose
Copy link
Collaborator

Sure, happy to do so

@mrocklin
Copy link
Member Author

Are there other options for websockets that we might want? If so, maybe

distributed:
  comm:
    websockets:
      shard: 5MiB

mrocklin pushed a commit that referenced this pull request Jul 15, 2021
Supersedes #5052 . In addition to making the default websocket maximum-frame-size smaller, this makes the specific value configurable. It's somewhat redundant with distributed.comm.shard, but the constraints on websockets are sufficiently different that a separate config seems okay.

This does not implement the fix in #5061, as that would read a config value for every frame, which is costly. So the config value will in general not be changed after import time.
@mrocklin
Copy link
Member Author

Superceded by #5070

@mrocklin mrocklin closed this Jul 19, 2021
@mrocklin mrocklin deleted the frame-split-size branch July 19, 2021 14:25
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