docs(media): load balancers may retry upload pieces on another instance
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -177,6 +177,12 @@ off and the rest of the server runs.
|
||||
and any instance may take the next one. Every part's payload is hashed into its
|
||||
signature, so a part damaged in transit is refused. A file sent in one `PUT` goes up
|
||||
part by part as it arrives, with at most three 16 MiB parts in memory.
|
||||
- **Behind a load balancer**, let a request that cannot reach one instance go to the
|
||||
next. Upload pieces are idempotent (a piece sent twice is a no-op), so this is safe
|
||||
even for their POST/PATCH, which nginx does not retry by default:
|
||||
`location ~ ^/v1/media/[0-9a-f]+/upload$ { proxy_next_upstream error timeout non_idempotent; … }`.
|
||||
Without it the client still retries, but a balancer that keeps sending its
|
||||
retries to a dead instance makes the run stop; running it again resumes.
|
||||
- **Racing uploads of one id** (on any instances) each go to their own object key;
|
||||
the primary key in Postgres admits one record, and the loser deletes its object.
|
||||
Delete removes the record first, so a crash never brings a film back.
|
||||
|
||||
Reference in New Issue
Block a user