Skip to content

fix: optimize WS file transfer with binary frames and larger chunks#482

Merged
Zakaria-Kofiro merged 5 commits into
masterfrom
zkofiro/ws-binary-transfer
Jun 29, 2026
Merged

fix: optimize WS file transfer with binary frames and larger chunks#482
Zakaria-Kofiro merged 5 commits into
masterfrom
zkofiro/ws-binary-transfer

Conversation

@Zakaria-Kofiro

@Zakaria-Kofiro Zakaria-Kofiro commented May 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes slow cross-region agent bootstrap by switching WebSocket file transfer chunks from base64 text frames to binary frames.

This reduces overhead during controller-to-agent bootstrap file delivery, especially for EAST controller -> WEST agent traffic, where bootstrap was taking ~4-5 minutes before this work. Also increases the bootstrap connection budget and adds transfer timing/throughput logs so we can see whether future bottlenecks are network, reconnects, or transfer behavior.

What Changed

  • Added binary WebSocket file chunk support for startup bootstrap and harness file transfer.
  • Updated controller transfer logic to send binary chunks instead of base64-encoded JSON payloads.
  • Added agent-side binary chunk handling for both startup and apiharness WS servers.
  • Increased startup bootstrap connection budget to reduce reconnect/resume loops on slower cross-region transfers.
  • Added transfer completion metrics: duration, chunk count, chunk size, resume offset, throughput.

Please make sure these check boxes are checked before submitting

  • ** Squashed Commits **
  • ** All Tests Passed ** - mvn clean test -P default

** PR review process **

  • Requires one +1 from a reviewer
  • Repository owners will merge your PR once it is approved.

@Zakaria-Kofiro Zakaria-Kofiro merged commit 2212788 into master Jun 29, 2026
4 checks passed
@Zakaria-Kofiro Zakaria-Kofiro deleted the zkofiro/ws-binary-transfer branch June 29, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants