The Problem with Pure WebSockets for Large File Transfers
While WebSockets excel at full-duplex, low-overhead messaging, pushing 50MB binary payloads directly down a WebSocket frame can clog the TCP pipeline, starve critical control packets (like heartbeats and chat notifications), and cause head-of-line blocking.
For SocketDrop, we adopted a hybrid architecture:
[Client A] --(HTTP POST /upload)--> [Spring Boot Server] --(Store & Tokenize)--> [Disk Storage]
|
(WebSocket Broadcast)
v
[Client B] <======================= [Room Event Notification]
[Client B] --(HTTP GET /download/token)--> [Download Stream]
This separation enables SocketDrop to smoothly handle up to 50 concurrent room participants without lagging the UI or dropping websocket connections.