| Architecture Dimension | Initial Sequential Prototype | SQL-Queue Resilient Service |
|---|---|---|
| Processing Model | Single spreadsheet row, sequential execution | Parallel.ForEachAsync (Degree: 10) + Semaphore throttling |
| Throughput Capacity | 1,125 files / hour | 8,314 files / hour (8.3x throughput gain) |
| Estimated 600K Duration | ~22 days of uninterrupted runtime | ~2.7 days (< 3 days total migration window) |
| Failure & Recovery | Process crash forfeits run; no automated recovery | SQL queue state machine with automated startup reclaim |
| Error Handling | Binary pass/fail outcome; fatal stops | Exponential backoff for transient errors; fast-fail on 401/403/404 |
| Overall Failure Rate | High cumulative risk over 3+ weeks | 0.00845% across 601,064 attempted files |
| Operability & Execution | Requires supervised interactive session | Self-contained scheduled service with worker heartbeats & run caps |
Moving 600,000 files sounds like a straightforward migration task—until each file must be reliably pulled
from a legacy system, uploaded to SharePoint, tracked, retried, and recovered at scale.
Initially, the project was simple: read one spreadsheet row, download the file, upload it to SharePoint,
mark it complete, and move on. It proved the concept, but not the scale. At that pace, 600,000 files would
take about 22 days of continuous runtime, with limited recovery if the process failed.
With revisions, that script became a self-contained, SQL-queue-driven migration service that moved more than
8,300 files per hour, recovered from vendor outages, SharePoint throttling, and database disconnects, and
reduced the migration window from more than three weeks to under three days.
Below, each area is described to show how the operational issues that often stall large-scale enterprise
migrations were resolved.
Parallelism and batching drove the entire order-of-magnitude gain. By optimizing concurrency and reducing
network idle time, the migration pipeline achieved dramatic performance improvements:
Parallel.ForEachAsync, with MaxDegreeOfParallelism raised from 4HttpClient instances, single-PUT uploads under 4 MB, and 5 MiB upload slicesRetry logic, status tracking, and reclaiming abandoned work left those throughput numbers untouched, but
they decided whether a 14-hour run survived to the end:
401, 403, and404 failed fast.Processing.Packaging, scheduling, heartbeats, and run caps determined whether the process could run unattended:
These changes did not increase files per hour. Instead, they made it possible to sustain that throughput for
14+ unattended hours instead of just one supervised hour.
A queue table is what made every other improvement possible.
It allowed progress to live at row granularity, enabled a killed run to reclaim its orphaned work on
restart, and allowed failures to be classified as retriable versus fatal instead of simply being logged.
This transformed the migration from a basic file-processing script into a resilient, recoverable migration
service.
| Stage | Concurrency | Files / Hour | Time for 600K Files | Operational Outcome |
|---|---|---|---|---|
| Sequential prototype | 1 | 1,125 | ~22 days | Concept proven, but infeasible for enterprise production |
| Parallel pilot | 4 | 3,410 | ~7.3 days | 3x gain, but exposed API throttling and disconnect failures |
| Production run | 10 | 8,314 | ~2.7 days | 8.3x speedup, self-healing, completed unattended |
The failure rate held at 0.00845%, and a targeted SQL index cut per-batch database reads by
28x as the queue grew toward 600,000 rows.
Before optimizing any migration or batch pipeline, classify each improvement by its purpose:
Speed should not come at the expense of resilience or observability. A pipeline that cannot recover from a
single failed connection is not truly performant; it is only reliable until the first failure occurs.
If your organization is planning a large-scale migration or looking to modernize its IT infrastructure,
Cloud Migration at Princeton IT Services can help you plan, execute, and manage a secure and reliable transition to the cloud.