Fastest Strategy for Delivering a 2 TB Dataset

Easy · Coding & Algorithms · Data Scientist · Onsite

Prompt

A collaborator based in San Francisco urgently needs a copy of a 2 TB dataset you hold, and your objective is to minimize the total wall-clock time until the dataset is ready and verified on their end.

Walk through how you would decide on the fastest delivery approach, justify your choice quantitatively under different operating conditions, and explicitly lay out the assumptions behind your recommendation.

Scope & Expectations

  • Clarify the situational variables that govern transfer speed—such as current storage location, upstream/downstream link capacity, geographic distance, budget, and data-governance policies.
  • Perform back-of-the-envelope throughput math comparing direct network transmission against physical drive delivery, accounting for unit conversions and practical overhead.
  • Recommend concrete delivery strategies across realistic regimes and explain how you would protect confidentiality and verify end-to-end data integrity.

Step-by-step walkthrough

  1. Clarify the constraints and state your assumptions

    In a data engineering or data science interview, "as fast as possible" means total end-to-end wall-clock time until the recipient in San Francisco can actually use and trust the dataset. That clock starts when you begin reading from the source and stops only after the data is copied, delivered, written at the destination, and verified.

    Before choosing a method, state the clarifying questions that control the math:

    • Where does the data live right now? On a workstation or office server, on a vehicle/edge recorder, or already inside cloud object storage (such as Amazon S3 or Google Cloud Storage)?
    • What is the real network bandwidth at both ends? Bandwidth is the maximum amount of data a link can carry per second, and the slower end caps the whole transfer. Home internet plans are usually asymmetric—fast downloads, slow uploads—so the sender's upload speed is often the bottleneck.
    • How far is the sender from San Francisco? Across town in the Bay Area, or across the country/ocean?
    • What security and compliance rules apply? Does company policy allow encrypted removable drives, or must sensitive data (such as street camera footage or user records) stay strictly on approved corporate networks?
    • What budget is acceptable, and is all 2 TB needed immediately? Can we spend $150–$300 on a portable drive, a courier, or cloud egress fees (charges cloud providers bill when data is downloaded out of their network)? Or does the recipient only need a 20 GB sample first?

    Without stated assumptions, every answer is "it depends." State clean defaults (decimal 2 TB = 2 × 10^12 bytes, ~80% real-world network efficiency, 500 MB/s external SSD speed) and show where one method overtakes another.

  2. Convert 2 TB into real network transfer time

    Storage sizes are quoted in bytes, while network link speeds are quoted in bits per second (1 byte = 8 bits). Using standard decimal units:

    2 TB = 2 × 10^12 bytes
         = 2 × 10^12 × 8 bits = 1.6 × 10^13 bits (16 terabits)
    

    (If the dataset is 2 TiB in binary units, 2 × 2^40 ≈ 2.20 × 10^12 bytes, add 10% to every time below.)

    Real transfers rarely hit 100% of the advertised line rate because packet headers, encryption framing, competing traffic, and congestion control consume ~10–30% overhead. Planning for 80% efficiency gives realistic wall-clock times:

    Link speed    100% ideal time              80% realistic time
    -----------------------------------------------------------------------
    20 Mbps       800,000 s = 222.2 h (9.3 d)  1,000,000 s = 277.8 h (11.6 d)
    50 Mbps       320,000 s =  88.9 h (3.7 d)    400,000 s = 111.1 h ( 4.6 d)
    100 Mbps      160,000 s =  44.4 h (1.9 d)    200,000 s =  55.6 h ( 2.3 d)
    1 Gbps         16,000 s =   4.4 h             20,000 s =   5.6 h
    10 Gbps         1,600 s =  26.7 min            2,000 s =  33.3 min
    

    Check two non-obvious bottlenecks before trusting the wire speed:

    • Disk read/write throughput. A spinning hard disk (HDD) reads sequentially at roughly 200 MB/s (1.6 Gbps), taking 2 × 10^12 / (2 × 10^8) = 10,000 s ≈ 2.8 hours on its own—capping a 10 Gbps network link at 1.6 Gbps. An NVMe SSD (a flash drive wired directly to the computer's high-speed PCIe bus) sustains 2,500+ MB/s and reads 2 TB in ~13 minutes.
    • Single-stream TCP limits. TCP (Transmission Control Protocol, the standard reliable transport protocol on the internet) limits how much unacknowledged data—the TCP window—can be in flight across one round-trip time (RTT), the time a signal takes to go from sender to receiver and back. With an unscaled 64 KiB window across a 70 ms coast-to-coast RTT, one stream tops out at 65,536 × 8 / 0.07 ≈ 7.5 Mbps even on a 10 Gbps fiber link. Modern operating systems auto-scale the window, but even tiny packet loss over long distances throttles a single TCP stream—so bulk transfer tools split the job across many parallel streams.
  3. Convert 2 TB into physical drive ("sneakernet") time

    Shipping a physical solid-state drive—often called sneakernet—trades high latency (hours before the first byte arrives) for huge effective bandwidth (all 16 terabits arriving at once). Its total time is the sum of copying onto the drive, physical transit, and copying off at the destination:

    Network pipeline (continuous stream):
      [Source SSD] ===(upload / WAN / download at bottleneck rate)===> [SF Destination]
    
    Physical SSD pipeline (store-and-forward):
      [Source SSD] --(USB copy: 1.1 h)--> [Encrypted Portable SSD]
                                                  |
                                (2 h Bay Area courier OR 24 h overnight air)
                                                  v
                                          [SF Destination] <--(USB copy + hash: 1.1 h)--
    

    Over a 10 Gbps USB-C port, a good portable SSD sustains roughly 500 MB/s (5 × 10^8 bytes/s), so copying 2 TB takes 2 × 10^12 / (5 × 10^8) = 4,000 s ≈ 1.11 hours each way. (Verify sustained write speed when buying the drive: budget SSDs drop to 100–200 MB/s once their fast write cache fills, which would stretch each copy to 3–5 hours.)

    Dividing 1.6 × 10^13 bits by total end-to-end time gives the drive's effective bandwidth:

    Bay Area courier (2 h drive):
      total = 1.11 h + 2.00 h + 1.11 h = 4.22 h (15,200 s)
      effective rate = 1.6e13 bits / 15,200 s ≈ 1.05 Gbps
    
    Overnight air courier (24 h door-to-door):
      total = 1.11 h + 24.00 h + 1.11 h = 26.22 h (94,400 s)
      effective rate = 1.6e13 bits / 94,400 s ≈ 170 Mbps
    
  4. Find the break-even network speed

    Now compare the two formulas directly:

    network_time  = total_bits / (line_rate × efficiency)
    physical_time = copy_on_time + transit_time + copy_off_time
    

    Because physical_time is dominated by fixed travel hours while network_time scales inversely with link rate, we get two crisp break-even thresholds (assuming 80% network efficiency):

    • Versus overnight shipping (26.2 h, 170 Mbps effective): the network wins whenever both ends can sustain more than 170 Mbps, which corresponds to a nominal line rate of 170 / 0.8 ≈ 212 Mbps.
    • Versus driving across the Bay Area (4.2 h, 1.05 Gbps effective): the network needs to sustain 1.05 Gbps, which requires a nominal line rate of 1.05 / 0.8 ≈ 1.32 Gbps. A local courier actually finishes slightly faster than a 1 Gbps link (5.6 h), and only 10 Gbps (~33 min) wins by a landslide.

    A short Python helper confirms all four cases:

    def network_hours(size_tb: float, rate_mbps: float, efficiency: float = 0.8) -> float:
        total_bits = size_tb * 1e12 * 8
        effective_bps = rate_mbps * 1e6 * efficiency
        return total_bits / effective_bps / 3600
    
    
    def drive_hours(size_tb: float, copy_mb_per_s: float, transit_hours: float) -> float:
        single_copy_hours = (size_tb * 1e12) / (copy_mb_per_s * 1e6) / 3600
        # Copy onto the drive, ship/drive it over, then copy off at the destination.
        return 2 * single_copy_hours + transit_hours
    
    
    print(round(network_hours(2, 50), 1))     # 111.1 h (4.6 days) on 50 Mbps upload
    print(round(network_hours(2, 1000), 1))   # 5.6 h on 1 Gbps fiber
    print(round(drive_hours(2, 500, 24), 1))  # 26.2 h via overnight shipping
    print(round(drive_hours(2, 500, 2), 1))   # 4.2 h via Bay Area courier
    

    If a deadline is critical and budget allows, you can hedge by running both in parallel: start the network upload immediately while dispatching an encrypted SSD by courier, and use whichever finishes first.

  5. Match the right method to each real-world scenario

    Scenario Fastest choice End-to-end time
    Data is already in cloud storage (S3 / GCS) Grant cross-account IAM permissions, pre-signed URLs, or run a cloud-side bucket copy—or spin up a cloud VM next to the data Minutes (zero bulk download needed)
    Sender is in the Bay Area, < 10 Gbps internet Hand-carry or same-day courier an encrypted portable NVMe SSD ~4.2 hours (note: 1 Gbps network at ~5.6 hours is close and hands-free)
    Sender is far away, both ends have 1 Gbps+ office/datacenter links Parallel, resumable network transfer (rclone, aws s3 cp, parallel rsync) ~5.6 hours at 1 Gbps (~33 min at 10 Gbps)
    Sender is far away on home/slow upload (20–50 Mbps) Overnight air courier with an encrypted portable SSD ~26 hours (vs 4.6–11.6 days over the wire)
    Strict policy forbids removable media Encrypted, authenticated corporate network transfer only Bound by approved WAN link speed

    Notice two important edge decisions:

    • Skip cloud transfer appliances (such as AWS Snowball or Azure Data Box) for 2 TB. Ordering the hardware, waiting for delivery, copying, shipping back, and waiting for cloud ingestion takes 4–7 days. Those appliances pay off at 50 TB to petabytes, not 2 TB.
    • Ask whether moving 2 TB is necessary at all. Letting the San Francisco colleague run their notebook or job on a remote machine next to the dataset—or sending a filtered 1% sample first—drops time-to-first-insight from hours to minutes.
  6. Make the transfer fast, secure, and verifiable

    Once you pick a transport, engineering details prevent multi-hour restarts and data leaks:

    • For network transfers:
      • Use parallel streams + automatic resume (rclone, aws s3 cp / gcloud storage cp, or rsync --partial) so a dropped connection at 95% resumes instead of starting over.
      • Pack small files first. Two million 1 KB files stall on per-file metadata round-trips; bundle them into multi-gigabyte .tar shards before sending.
      • Compress selectively. Fast compressors like zstd shrink raw CSV, JSON, or text logs 3–5×, multiplying effective bandwidth; already-compressed formats (MP4 video, JPEG images, Parquet) barely shrink and only waste CPU.
      • Encrypt in transit over TLS (Transport Layer Security) or SSH.
    • For physical drives:
      • Encrypt at rest (LUKS, FileVault, or BitLocker) and share the decryption key over a separate secure channel (such as an enterprise password manager or Signal), never on a sticky note inside the box.
      • Keep the source data intact until the recipient confirms verification.
    • For both routes — verify integrity with checksums:
      • A checksum (or cryptographic hash such as SHA-256) is a fixed-length digital fingerprint computed from a file's exact bytes; if even one bit flips during copy or transit, the fingerprint changes completely. Generate a manifest.sha256 file at the source and verify it at the destination:
    import hashlib
    
    
    def sha256_of_file(path: str, chunk_bytes: int = 8 * 1024 * 1024) -> str:
        digest = hashlib.sha256()
        with open(path, "rb") as file_handle:
            while True:
                chunk = file_handle.read(chunk_bytes)
                if not chunk:
                    break
                digest.update(chunk)
        return digest.hexdigest()
    
  7. Deliver a crisp spoken summary

    "First I'd clarify where the 2 TB lives, both ends' real upload/download speeds, distance to San Francisco, and security rules. Doing the unit math, 2 TB is 16 terabits: at 80% real-world efficiency, a 1 Gbps link takes about 5.6 hours, while a 50 Mbps home upload takes 4.6 days. By contrast, copying onto an encrypted 500 MB/s portable SSD takes about 1.1 hours each way—so driving it across the Bay Area takes ~4.2 hours (1.05 Gbps effective), and overnight shipping takes ~26 hours (170 Mbps effective). Therefore: if the data is already in the cloud, I share permissions or compute next to it in minutes; if we're both in the Bay Area without 10 Gbps, a couriered encrypted SSD wins in ~4 hours (though 1 Gbps at ~5.6 hours is an easy hands-free runner-up); if we're remote with 1 Gbps+ office links, parallel resumable network transfer beats overnight shipping; and if upload bandwidth is under ~200 Mbps, I overnight-ship an encrypted SSD. In every case, I bundle tiny files, encrypt the data, and verify SHA-256 checksums before calling the transfer done."

Intuition & how it works

Think of transferring a 2 TB dataset to San Francisco like moving 2,000 thick encyclopedias across town or across the country. You have two fundamentally different ways to move them: scan and send them page by page through a pipe (the network), or pack them into boxes, load them into a vehicle, and drive or fly them over (physical media, affectionately called sneakernet). If the books are already sitting in a shared library (the cloud), the fastest move of all is simply handing your colleague a library card instead of copying anything.

The naive answer—"just upload it to a file-sharing link"—falls apart as soon as you check the arithmetic. Storage sizes are measured in bytes (1 byte = 8 bits), network speeds are measured in bits per second, and residential internet uploads are typically far slower than downloads. Sending 2 TB over a 50 Mbps home upload takes well over four days, whereas copying it onto a pocket-sized solid-state drive and driving across the Bay Area finishes in about four hours.

Walk through a concrete three-way comparison using 2 TB = 2 × 10^12 bytes = 1.6 × 10^13 bits (16 terabits) and a realistic 80% network efficiency factor:

  1. Slow home upload (50 Mbps nominal -> 40 Mbps effective): 1.6 × 10^13 / (40 × 10^6) = 400,000 seconds ≈ 111 hours (4.6 days).
  2. Fast office fiber (1 Gbps nominal -> 800 Mbps effective): 1.6 × 10^13 / (800 × 10^6) = 20,000 seconds ≈ 5.6 hours.
  3. Encrypted USB SSD (500 MB/s sustained copy): 1.1 hours to copy on + transit + 1.1 hours to copy off = 4.2 hours with a 2-hour Bay Area courier (1.05 Gbps effective), or 26.2 hours via 24-hour overnight shipping (170 Mbps effective).

Key points

  • Convert bytes to bits before dividing by bandwidth. 2 TB = 1.6 × 10^13 bits. At 80% efficiency, 10 Gbps takes ~33 min, 1 Gbps takes ~5.6 h, 100 Mbps takes ~2.3 days, and 20 Mbps takes ~11.6 days.
  • Physical transit has high latency but massive effective bandwidth. Latency is the delay before the first byte arrives; bandwidth (or throughput) is total data delivered per second. Overnight shipping (~26.2 h including both 1.1 h USB copies) equals ~170 Mbps sustained (~212 Mbps nominal line rate at 80% efficiency); a 2-hour local drive (~4.2 h total) equals ~1.05 Gbps sustained (~1.32 Gbps nominal line rate).
  • Use the break-even formula. Compare bits / (rate × efficiency) against copy_on + transit + copy_off. Network time grows linearly with dataset size, whereas shipping transit time is flat—so larger datasets and slower uploads favor physical drives.
  • Check every link in the chain. The slowest stage sets the speed: sender upload, receiver download, spinning disk (HDD) read speed (~200 MB/s = 1.6 Gbps), single-stream TCP (Transmission Control Protocol) throttling over high round-trip time (RTT), or single-core CPU saturation from compression.
  • Zero-copy beats every transfer. If the 2 TB already lives in cloud storage (S3 or GCS), grant bucket access or run compute next to the data in minutes rather than downloading terabytes locally.
  • Security and verification are mandatory. Encrypt network traffic (TLS/SSH) and physical drives (FileVault/LUKS/BitLocker, sending the key over a separate channel), keep the original copy until done, and verify a SHA-256 checksum (a cryptographic fingerprint of each file's exact bytes) at the destination.

Common mistakes

  • Forgetting the 8 bits per byte factor. Dividing 2 × 10^12 directly by 10^9 gives 2,000 seconds (33 minutes) instead of 16,000 seconds (4.4 hours), making the network look 8× faster than reality.
  • Quoting download speed instead of upload speed. A sender on a "500 Mbps home plan" often has only 20–35 Mbps upstream, turning an expected afternoon transfer into more than a week.
  • Assuming 100% of advertised line rate. Protocol headers, competing traffic, and TCP congestion control typically leave 70–90% efficiency, and millions of tiny files can slash throughput much further unless bundled with tar.
  • Ignoring read/write copy time on physical drives. Writing 2 TB onto an SSD and reading it off at 500 MB/s adds ~2.2 hours total—and budget SSDs whose fast cache fills up can slow down by 3–5× mid-copy.
  • Proposing a cloud transfer appliance (like AWS Snowball) for 2 TB. Hardware appliances take several days of ordering, two-way shipping, and cloud ingestion, and only load into cloud buckets; they make sense at 50 TB+, whereas a single off-the-shelf SSD or gigabit link is far faster at 2 TB.
  • Skipping encryption or integrity checks. Mailing an unencrypted drive risks a severe data breach if lost, and declaring success without checking hashes can leave silent corruption undetected.

Follow-up questions

  • How does your recommendation shift if the payload grows from 2 TB to 200 TB? Every network and copy time scales up 100×: on a 1 Gbps link at 80% efficiency, 200 TB takes 2,000,000 seconds ≈ 23.1 days, and even 10 Gbps takes ~2.3 days. A single consumer portable SSD no longer works either—both because consumer portable SSDs only hold 2–8 TB of capacity and because writing 200 TB sequentially at 500 MB/s would take 4.6 days each way. At 200 TB, you either stripe writes in parallel across a multi-drive RAID/NAS array, order ruggedized cloud transfer appliances (such as multiple AWS Snowball Edge units), or use a dedicated 40–100 Gbps datacenter interconnect.
  • Suppose both endpoints sit on 1 Gbps fiber links, yet actual throughput plateaus near 100 Mbps—how would you diagnose the bottleneck? Test each stage independently instead of guessing. First, run iperf3 between the two machines with 1 stream and then 8 parallel streams: if 8 streams hit ~900 Mbps while 1 stream stalls at 100 Mbps, high round-trip time (RTT) or packet loss is throttling single-stream TCP, so switch to a multi-stream tool like rclone. Next, benchmark disk read speed (dd or fio) on a file larger than system RAM so the operating system's page cache (unused memory that caches recent disk reads) cannot mask a slow spinning disk. Finally, inspect top for a single CPU core pegged at 100% by SSH encryption or heavy compression, and check whether millions of tiny files are causing metadata stalls that tar archiving would eliminate.
  • Once the transfer finishes, how should the receiver confirm that every byte arrived intact without silent corruption? Before transfer, generate a manifest listing every file's byte size and SHA-256 hash at the source, then have the recipient recompute and compare every entry (sha256sum -c manifest.sha256, rclone check, or rsync --checksum --dry-run). Do not rely solely on file counts or byte sizes, which miss flipped bits inside a file. Also watch out for cloud object ETags (metadata tags returned by object stores like S3): for multipart uploads, an S3 ETag is a hash-of-part-hashes rather than the plain MD5 of the whole file, so verify explicit SHA-256 checksums end to end.

Follow-up questions

Similar questions

More Zoox interview questions

All 22 Zoox questions →