Large file uploads
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Layer 3 · Go deeper · 8 min

    Go deeper

    Size it, build it, then make the calls an interviewer will push you on.

    Back of the envelope

    Size it up

    Tap through each step of the arithmetic.

    How long does a 4 GB video take at 20 Mbit/s?

      What do 50,000 uploads a day of 1 GB mean?

        How big should the parts be?

          How much do unfinished uploads pile up?

            Build-up · 5 steps

            Resume an MRI upload over 4G

            A district hospital sends a 2 GB study with the tus protocol. Each step is one request or event, ending with only the missing bytes sent.

            Step 1 of 5

            Create the upload

            The app POSTs the size and metadata, and the server answers 201 with an upload URL. The app saves it, with a fingerprint of the file, in local storage.

            4 interview moments

            You’re the candidate

            The interviewer pushes on the hard parts. Pick an approach and see how it holds up.

            1. Deep dive 1 of 4

              Interviewer

              “Creators upload multi-gigabyte videos. Should the bytes pass through your API servers?”

              Your move. Pick an approach:

            2. Deep dive 2 of 4

              Interviewer

              “The API signs the upload URL. Which URL do you hand the client?”

              Your move. Pick an approach:

            3. Deep dive 3 of 4

              Interviewer

              “A camera uploads 200 GB files with S3 multipart. Which part size do you pick?”

              Your move. Pick an approach:

            4. Deep dive 4 of 4

              Interviewer

              “To save bandwidth, create skips the upload when any user already stored the same SHA-256. Ship it?”

              Your move. Pick an approach: