Usman Ali
← Work

Pass Gallery migration

A pipeline that moves photographers' galleries from four platforms into Pass Gallery. 500k+ images per client, from 3 to 5 days down to under 24 hours.

Qbatch, 2025. Solo developer. Backend only, no UI.

My part

  1. v1, sequential
  2. v2, distributed
  3. Owning ECS and SQS
  4. Datadog for the logs

The system

v2 in one picture: three metadata steps, then the download workers.

I wrote about this build: Scalable Distributed Architecture for Multi Platform Image Migration

The flow

Galleries come from Pic-Time, Pixieset, ShootProof and Zenfolio.

  1. Fetch galleries

    Puppeteer and Playwright scripts read the source platform.

  2. Fetch sets

    Then the sets inside each gallery.

  3. Photo metadata

    The metadata of every photo is saved to MongoDB.

  4. Download

    A worker takes each photo from the transfer queue.

  5. Upload

    The photo goes up to Pass Gallery.

The decision

A worker crashes in the middle of 500k images. What now?

One client can have 500k+ images, and a migration runs for many hours. A crash should not cost the work already done.

  1. v1, sequential. Download every image, then upload everything. It crashed mid-run, and upload waited for download.
  2. v2, distributed. Small steps, and each step pushes the next step's message to SQS.

The cost: more moving parts, and two queues to watch.

Four more rules the pipeline follows

  1. After a crash, the job resumes from the last step.
  2. Two queues split the work: one scrapes metadata, one downloads and uploads.
  3. Empty galleries and sets are created in Pass Gallery while scraping, so upload never waits.
  4. 30 workers run at once: 3 VMs, 10 each.

What broke, and what I changed

  1. v1 took 2 to 3 days just to download

    v1 was one run with repeated logins to the source platform. v2 splits the download across workers.

  2. Logs were scattered across the workers

    I added Datadog so one job can be followed in one place.

Built with

Puppeteer, Playwright. Amazon SQS, Amazon ECS, Docker, 3 VMs. MongoDB. Datadog.

Next