tags : HTTP

FAQ

Do you need Tus server if you use s3 multipart?

Use of responses in FastAPI

Multipart Upload / Download?

  • There’s nothing called multipart download. This can be sort of emulated with HTTP Range requests.
  • Multipart Upload is a real thing.

Purpose of Multipart Upload

  • To upload large files (typically over 100 MB) more efficiently
  • To resume interrupted uploads
  • To upload parts of a file in parallel, potentially increasing throughput

S3 and Multipart Uploads

S3 based storage & Multipart uploads

  • Performance: We can upload multiple chunks in parallel
    • “S3 uses HTTP/1.1, which means a limit to concurrent connections and your uploads may expire before they are uploaded.“, source
  • Reliability: We can retry parts which fail
  • File limits: S3 has a 5GB limit in a single PUT

The story with content-length

Use of Uppy

Uppy is a combination of opinionated fronetend library and some backend components and more of an architecture aswell.

Content Disposition

Usage

  • Response from server: It’s used by the server to indicate whether the file should be downloaded / viewed inline
  • Multipart Upload: It’s also used as part of multi-part upload.

HTTP Streaming

Chunked Transfer Encoding

  • See Chunked transfer encoding - Wikiwand
  • Chunked transfer encoding makes sense when you don’t know the size of your output ahead of time, and you don’t want to wait to collect it all to find out before you start sending it to the client.
    • apply to stuff like serving the results of slow database queries