Back to System Design Lab

An upload drops halfway. Only half a part gets sent twice.

Product photos and videos go from the browser straight to storage, not through the shop's server. Files are cut into 8 MB parts, four parts travel at once, and each part has its own signed address. Three storage servers were tested with the same flow.

Storage

Upload, MB/s176.8
Download, MB/s173.1
Wasted, %6.3
Tests passed7/7

A 64 MB file, 8 parts, cut off in part 5

After the connection drops, the browser asks storage which parts it already has, and sends only the rest. The only waste is the piece of part 5 that got through: 4 MB.

  • Already stored when it dropped
  • Cut off, sent again
  • Sent after resuming

All three pass. Garage differs in two small ways.

TestSeaweedFS 4.54Garage v2.5.0RustFS 1.0.6
Download, SHA-256 matchesmatchesmatchesmatches
Drop, then resume from what is leftyesyesyes
After cancel, the next part404404404
Signature, part number, or key changed403, 403, 403403, 403, 403403, 403, 403
Address past its expiry403400 (differs from AWS)403
CORS preflight from another siterejectedallowed (*) (differs from AWS)rejected
LicenseApache-2.0AGPL-3.0Apache-2.0

Through the server, memory stays safe, but CPU goes up 10 times

When file content streams through the shop's server, memory stays small because nothing is buffered. But the server's CPU and network carry every byte.

  • Straight to storage75 ms CPU, 10.6 MB memory
  • Through the shop server746 ms CPU, 7.9 MB memory
Show the technical side
  • The berkas service creates a multipart upload and signs one URL per 8 MB part. File content never passes through it.
  • The browser sends four parts at once. After a drop or a pause it asks ListParts and sends only the parts that are missing.
  • The server checks the final size before handing out a download URL, so an incomplete file cannot be shared.
  • MinIO was not tested: its repository was archived on 25 April 2026, with no new community release since October 2025.
  • Garage rejects an expired URL with 400, not 403 like AWS. A client that reads the status code to decide “ask for a new URL” needs to accept both.
  • Garage answers CORS preflight from any origin with *, even though the bucket rule names only the shop. The signed URL is still the key: another site still needs that URL to upload.