Skip to content

(WIP) Support for large RPC messages using compression + data streams#1832

Draft
1egoman wants to merge 14 commits intomainfrom
rpc-with-compression-data-streams
Draft

(WIP) Support for large RPC messages using compression + data streams#1832
1egoman wants to merge 14 commits intomainfrom
rpc-with-compression-data-streams

Conversation

@1egoman
Copy link
Contributor

@1egoman 1egoman commented Mar 11, 2026

Currently this prototype does the below:

  • Use the existing RPCRequest path with a payload under 1000 bytes
  • Between 1000 bytes and 15kb, compress the payload and include this on the RPCRequest inline (compressedPayload)
  • Above 15kb, compress and send via data streams

Also undertakes some signifigant refactoring to move RPC logic out into a RpcClientManager / RpcServerManager, which given the increase in complexity makes the code a little less fragmented / easier to reason about.

Todo

  • Tests have not been updated, so do that

@changeset-bot
Copy link

changeset-bot bot commented Mar 11, 2026

⚠️ No Changeset found

Latest commit: 6128790

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 88.07 KB (+1.53% 🔺)
dist/livekit-client.umd.js 98.62 KB (+1.33% 🔺)

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.

1 participant