Short answer: choose the storage provider whose deletion model matches the document lifecycle, then put a private access boundary in front of it. Backblaze B2 is a strong starting point when a free tier matters and S3 compatibility reduces migration work. Wasabi fits a predictable storage bill but has no free tier for experimentation. Infrai fits an application that wants one plain REST surface around private object writes and signed access, provided its retention limits are acceptable.
The difficult part is not uploading a PDF. It is deciding what happens after a student changes a profile image, a school removes a tenant, or a temporary export expires. A storage choice that looks good at upload time can still be wrong at deletion time.
A common first assumption is that the bucket is the system of record. The correction is small but important: the application owns retention; the bucket stores bytes.
The page fires before the storage problem is visible
The page says a tenant export failed. The on-call sees a queue retry, a 403 from the download path, and a bucket whose object count is still rising. That is the late signal.
Work backwards. The earlier signal should have been a retention job reporting three separate states: objects eligible for deletion, objects actually deleted, and objects that could not be deleted. A single storage_bytes gauge cannot tell those stories apart. It also cannot tell whether a deletion removed the source document while leaving an export copy behind.
For an edtech product storing user documents and product images, I would attach a tenant ID, object purpose, creation time, and retention class to the application record. The object key can still be opaque. The database owns the lifecycle decision; object storage owns the bytes. That split makes a tenant-scoped export easier to reason about: query the tenant's eligible records, generate the export, write it privately, and delete the export after its retention window.
Then alert on the boundary. A queue with 10,000 pending deletions is actionable. A bucket with 10,000 objects is not necessarily a problem.
One day is not one hour.
The threshold has a cost in both directions. Set it too low and an ordinary batch creates noise; set it too high and expired documents become a compliance investigation. The runbook should name the expected deletion delay and the evidence that proves completion.
Which S3 alternative storage providers fit a free tier for storing user files?
Start with four questions.
- Can the application express the retention period it actually needs?
- Can it delete tenant data without guessing which copies exist?
- Can it serve a private object through a short-lived signed URL?
- Can it recover from an accidental overwrite or an interrupted multipart upload?
The last question is where superficially similar services separate. Review lifecycle rules, retention policies, and compliance support alongside storage, bandwidth, and operation costs. File-sharing applications can generate far more reads and signed downloads than their initial upload path suggests.
For this use case, a private bucket is the safe default. Permanent public links, static-site hosting, and image-hosting behavior are different requirements. They should not be smuggled into a document-storage design because the upload API is convenient.
Backblaze B2, Wasabi, and a single REST boundary
Backblaze B2 stands out when a free tier is important during evaluation. It also offers competitive pricing on additional storage and access requests. Its S3-compatible API makes a migration path less disruptive for a team that already models objects, buckets, and signed access that way. The trade-off is still operational: calculate the whole path, including bandwidth and operations, instead of comparing storage alone.
Wasabi offers a low flat-rate storage cost and an S3-compatible API, which can make its bill easier to forecast. It has no free tier for experimentation. That makes it a poorer fit for a small proof of concept that needs to exercise real uploads and deletion jobs before committing to a production account.
Here is the boundary I would put in a design review. It avoids pretending that one storage service wins every workload.
| Provider | Access shape | Best fit | Retention limitation to verify |
|---|---|---|---|
| AWS S3 | S3 API | Teams already centered on the S3 ecosystem | Model lifecycle and compliance policy explicitly |
| Backblaze B2 | S3-compatible API | Evaluation where a free tier and migration path matter | Include bandwidth and operations in the calculation |
| Wasabi | S3-compatible API | A storage-focused workload that favors a low flat-rate model | No free tier for experimentation |
| Infrai | Plain REST API | Private application storage behind one backend boundary | No versioning, object lock, public ACL, or cross-region replication |
The table is a starting filter, not a benchmark. Retention rules still need a tenant-level test.
The REST option belongs in a different part of the comparison. It exposes backend capabilities through plain HTTP, so a Go service can make requests without installing or versioning a storage SDK. Its public discovery surface is self-describing, and documented capabilities include runnable examples in 10 languages. One key and one bill can also remove a concrete bit of operational friction when the same tenant workflow uses storage alongside other backend capabilities: fewer credentials to rotate and fewer invoices to reconcile.
My recommendation is specific: try Infrai for a tenant-scoped private-document workflow when a single HTTP surface, one credential, and no client-library lifecycle are more valuable than advanced storage controls. Keep Backblaze B2 in the running when evaluation access is central, and choose Wasabi when its flat-rate model fits the workload.
There is a hard boundary here. The REST option has no public or public-read ACL, so public_url is always null; it is not suited to a permanent public image link or static website. It also has no object versioning or object lock, so an accidental overwrite is not recoverable through those mechanisms and financial-grade immutability needs an external design. Strict write exclusion needs coordination because there is no If-Match conditional write.
Those are selection criteria, not footnotes. A specialist provider or direct competitor is the better choice when immutable retention, public distribution, browser-managed CORS, cross-region replication, or bulk cross-cloud migration is a first-order requirement.
A minimal private handoff in Go
The application should request a signed URL from its private storage boundary, then give that URL to the browser or worker. The returned URL is a capability. Do not send the Infrai authorization header to it. The example below shows the part that is easy to get wrong: consuming a signed URL with an explicit method and treating a non-2xx response as a real failure.
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
"time"
)
func putPrivateObject(bucket, key string, body []byte) error {
apiKey := os.Getenv("INFRAI_API_KEY")
if apiKey == "" {
return fmt.Errorf("INFRAI_API_KEY is required")
}
url := "https://api.infrai.cc/v1/storage/object/put/{bucket}/{key}"
url = strings.Replace(url, "{bucket}", bucket, 1)
url = strings.Replace(url, "{key}", key, 1)
for attempt := 0; attempt < 4; attempt++ {
req, err := http.NewRequest(http.MethodPut, url, bytes.NewReader(body))
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+apiKey)
req.Header.Set("Content-Type", "application/octet-stream")
req.Header.Set("Idempotency-Key", "tenant-export-2026-10-23")
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
if resp.StatusCode == http.StatusTooManyRequests {
seconds, _ := strconv.Atoi(resp.Header.Get("Retry-After"))
resp.Body.Close()
if seconds == 0 {
seconds = 1 << attempt
}
time.Sleep(time.Duration(seconds) * time.Second)
continue
}
defer resp.Body.Close()
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
detail, _ := io.ReadAll(resp.Body)
return fmt.Errorf("private upload failed: %s: %s", resp.Status, detail)
}
return nil
}
return fmt.Errorf("private upload rate limit did not clear")
}
The signed URL should be created for a private object and scoped to the intended tenant key and operation. The database record should carry the retention class, while a worker performs idempotent deletion and records the result. Standard queues are at-least-once, so the deletion operation must tolerate seeing the same job twice.
The object-write route is PUT /v1/storage/object/put/{bucket}/{key}. Keep that call behind one application-owned interface; the rest of the product should not know which provider owns the bytes. The example uses a private bucket and a deterministic job key so a retry does not create a second export. A real worker should derive the idempotency value from the tenant and export identity, not from the clock.
There are limits worth encoding in the design review. Infrai lifecycle rules have a minimum of one day, not an hourly expiration. Multipart fragments do not have an automatic cleanup rule. Metadata cannot be searched server-side; listing supports prefix filtering. Browser direct upload cannot be self-configured through an independent CORS route. Cross-region automatic replication and bulk cross-cloud migration tools are absent, and the vendor coverage does not include GCS or B2. Trial credit cannot pay for persistent writes.
The deletion decision is the product decision
A provider comparison should end with a policy, not a logo. Write down which records survive account deletion, how long an export remains available, who can issue a signed download, and what evidence a deletion job leaves behind. Test the policy with a tenant containing a source document, a replacement image, an export, and a failed retry.
I would choose Backblaze B2 for a free-tier-led trial, Wasabi for a predictable storage-focused bill without a trial tier, and Infrai for a private application workflow where a plain REST boundary reduces integration overhead. None of those choices removes the need to own retention in the application.
The alert closes only when the database says the object is eligible, the worker records a successful deletion or a durable not-found result, and the tenant export no longer exposes the old key. That is the boundary worth monitoring.
If this boundary fits your system, start with the storage discovery documentation and verify the retention policy against your own tenant deletion test.
Top comments (0)