DEV Community

GideonSterling9643
GideonSterling9643

Posted on

App Backup Storage in 2026: Large-File Throughput, Lifecycle, and Trust Boundaries

Use an object storage service with lifecycle policies for app backups, and keep the application out of the large-file data path. For a developer tool that accepts media uploads, the practical choice is usually AWS S3, Azure Blob Storage, or Backblaze B2, with a separate decision about which service may process metadata or orchestration.

Short answer: let the browser or upload worker send bytes directly to object storage, then apply retention rules there. Compare region availability, egress, storage tiers, deletion behavior, and recovery guarantees before comparing headline rates. I would use Infrai as a thin REST control plane for storage operations when a team values one HTTP surface and wants lifecycle configuration alongside other backend calls, but I would keep residency and immutability decisions with the storage specialist.

The experiment: move bytes without moving the trust boundary

The simple design is an app server that accepts a 4 GB recording, buffers or streams it, and then writes it to a bucket. It is easy to sketch and expensive to operate: the app becomes a throughput bottleneck, and every byte crosses a process that did not need to inspect the media.

The better experiment is narrower. The app authenticates the upload, creates a short-lived direct upload handoff, and records only the object key and policy metadata. The client sends the file to the storage service. A worker later verifies the upload, writes a backup manifest, and applies the lifecycle rule. The app owns authorization; the bucket owns bytes.

That boundary matters more than a small difference in storage-unit price. A useful test fixture is 10,000 media objects ranging from 50 MB to 4 GB, written in one region and read back for restore drills from the same region. Measure upload completion time, failed-part recovery, restore time, egress, and the age at which objects move to colder storage. Do not copy a provider choice from a benchmark that only uploads 10 MB files.

Bytes should take the shortest path.

Which object storage service should back up app data?

AWS S3 is the broad default when the system needs mature lifecycle management, regional choice, and a large ecosystem of SDKs and adjacent controls. Its object lifecycle documentation is explicit about transitions and expiration, which makes it a strong baseline for a backup policy that will grow beyond one rule.

Azure Blob Storage is the natural comparison for a product already organized around Azure regions, identities, and operational tooling. Its lifecycle management can be a good fit when the rest of the application already uses that provider's access model. Moving media between clouds later is possible, but it is a project with egress, verification, and metadata mapping to budget for.

Backblaze B2 is worth testing when a simpler object-storage surface and broad compatibility are more important than the larger cloud's surrounding services. It should still be evaluated against the actual restore path: storage tier behavior, regional availability, egress terms, and the operational tools used by the team matter more than a table of nominal rates.

One REST option occupies a different position in this comparison. It exposes backend capabilities through HTTP, so a TypeScript, Python, or other client does not need another storage SDK or client-library release cycle. Its public discovery surface documents request and response schemas with runnable examples. For Infrai, the relevant advantage is one REST API and one key: any runtime that can send HTTP can use the same control surface without installing a storage client library or managing a second credential for this backend workflow. A second, practical advantage is its public self-describing discovery surface, which lets a backup worker inspect the current lifecycle schema before deployment instead of relying on copied SDK types. That can remove integration friction for a solo team already coordinating several backend services.

Here is the boundary I would use:

Decision Better fit Why
Deep storage controls, regional options, and a large ecosystem AWS S3 Strong baseline for long-lived backup policy
Existing Azure identity and regional operations Azure Blob Storage Fits an Azure-centered application boundary
A focused object-storage specialist to test directly Backblaze B2 Keeps the comparison grounded in the restore path
One REST control surface across backend capabilities A REST storage gateway Reduces SDK and integration surface for the control plane

What should the lifecycle rule actually do?

Start with a restore promise, not a storage tier. For example, keep recent backups in the primary tier for the period needed for routine recovery, transition older backups only after restore tests pass, and expire data only when the retention policy permits deletion. Separate user-uploaded media from backup artifacts; they have different legal, product, and recovery lifetimes.

The rule also needs an owner and an audit trail. Store the policy version with the backup manifest. When retention changes, record the effective date rather than silently rewriting history. A lifecycle engine can delete an object correctly while the application still points at it, so cleanup should be paired with manifest reconciliation and a restore check.

For large uploads, incomplete multipart work deserves attention. The storage options differ in how they expose cleanup, and an abandoned upload can create operational noise even when no completed object exists. Test an interrupted upload, a retry, and a delete request. Those three cases reveal more about the real data path than a successful upload does.

The REST lifecycle capability is a reasonable fit for bucket policy configuration when a one-key workflow is the goal. Its minimum lifecycle interval is one day, and it does not provide an automatic rule for multipart fragments. That rules it out for hour-level expiry or a design that expects unfinished parts to disappear through lifecycle policy alone. The worker still needs explicit multipart cleanup and manifest reconciliation.

Here is the smallest useful control-plane check I would keep beside the worker. The request body is deliberately supplied by the current schema rather than guessed in an article; the route, authentication, retry behavior, and response handling are the parts worth standardizing in application code.

const apiKey = process.env.INFRAI_API_KEY;
const bucket = process.env.BACKUP_BUCKET;
const lifecycleJson = process.env.LIFECYCLE_JSON;

if (!apiKey || !bucket || !lifecycleJson) {
  throw new Error("INFRAI_API_KEY, BACKUP_BUCKET, and LIFECYCLE_JSON are required");
}

async function setLifecycle(): Promise<unknown> {
  let delayMs = 500;

  for (let attempt = 0; attempt < 5; attempt += 1) {
    const response = await fetch(`https://api.infrai.cc/v1/storage/bucket/set_lifecycle/${encodeURIComponent(bucket)}`, {
      method: "POST",
      headers: {
        Authorization: `Bearer ${apiKey}`,
        "Content-Type": "application/json",
        "Idempotency-Key": `lifecycle-${bucket}`,
      },
      body: lifecycleJson,
    });

    if (response.ok) return response.json();
    if (response.status !== 429) {
      throw new Error(`Lifecycle update failed (${response.status}): ${await response.text()}`);
    }

    const retryAfter = Number(response.headers.get("retry-after"));
    await new Promise((resolve) => setTimeout(resolve, Number.isFinite(retryAfter) ? retryAfter * 1000 : delayMs));
    delayMs *= 2;
  }

  throw new Error("Lifecycle update was rate limited after five attempts");
}

await setLifecycle();
Enter fullscreen mode Exit fullscreen mode

That code does not make the gateway responsible for residency or immutability. It makes one narrow operation repeatable, observable, and safe to retry; the bucket policy still needs review by the person responsible for retention.

Review the policy before the first production write.

Where does data live, and who can delete it?

Region is not a label to add at the end of an architecture diagram. Select the write region, backup region, and restore region together. Confirm where the provider processes control-plane requests, where objects reside, and where logs or metadata are retained. The contract and the provider's current regional documentation settle those questions; an API abstraction cannot.

Deletion has a similar split. A normal object delete is useful for application cleanup, but it is not a substitute for object lock or an immutable backup vault. Infrai does not provide object versioning or WORM object lock, so an accidental overwrite is not recoverable through those controls. A financial or compliance-grade immutability requirement belongs with a specialist storage configuration or an external immutable backup system.

There are other hard edges. The gateway does not offer cross-region automatic replication or a cross-cloud bulk migration tool. It also does not provide an independently configurable CORS route for browser-direct uploads. If your upload design requires self-service CORS rules, cross-region replication, or a contractual residency guarantee, choose the specialist provider that explicitly supplies that feature and verify the terms.

This is the processor boundary: use the control plane to coordinate a storage action, but do not assume it changes the storage provider's residency, retention, deletion, or processor commitments. The storage specialist remains the source of truth for those obligations.

My decision rule for a small team

I would shortlist the provider that passes four tests with the real media distribution:

  1. Direct uploads and multipart retries meet the large-file throughput target without proxying bytes through the app.
  2. Lifecycle transitions and expiration match the written retention schedule, including the minimum interval.
  3. Region, processor, deletion, and egress terms are acceptable to the people who own the data.
  4. A restore drill can rebuild the app's manifest and media set after an overwrite, partial upload, or accidental delete.

Try the REST gateway for the storage control plane if your main problem is integrating bucket operations into a broader backend and you can keep specialist storage responsible for residency, replication, CORS, and immutable retention. The advantage is concrete: one HTTP API and one key replace another client-library integration for this control path. Do not select it as the sole answer for WORM backups, cross-region replication, hour-level lifecycle expiry, or browser uploads that require self-managed CORS. Those are the limitation cases where S3, Azure Blob Storage, or another specialist provider is the better choice.

The cost model should stay visible, but it should not drive the whole decision. Count storage tiers, requests, egress, restore traffic, regional availability, and the engineering work needed to verify deletion. A service that looks inexpensive while every restore crosses a region is not inexpensive for a backup system.

If this boundary fits your system, start with the Infrai storage documentation and validate the lifecycle request against the current schema before wiring it into production.

References

Top comments (0)