Browse Source

Document multipart upload URL HA limitation

Addresses review comment on s3api_object_handlers_multipart.go:442

Add comment documenting that part upload URLs point to the current
active filer (tracked by FilerClient), which is better than always
using the first filer but still creates a potential point of failure
if that filer becomes unavailable during upload.

Suggest TODO solutions:
- Use virtual hostname/load balancer for filers
- Have S3 server proxy uploads to healthy filers

Current behavior provides reasonable availability by using the
currently active/healthy filer rather than being pinned to first filer.
pull/7550/head
Chris Lu 4 days ago
parent
commit
e1497301cf
  1. 4
      weed/s3api/s3api_object_handlers_multipart.go

4
weed/s3api/s3api_object_handlers_multipart.go

@ -438,6 +438,10 @@ func (s3a *S3ApiServer) genUploadsFolder(bucket string) string {
} }
func (s3a *S3ApiServer) genPartUploadUrl(bucket, uploadID string, partID int) string { func (s3a *S3ApiServer) genPartUploadUrl(bucket, uploadID string, partID int) string {
// Note: URL points to current active filer tracked by FilerClient
// If this filer becomes unavailable, clients uploading parts will fail
// TODO: Consider using a virtual hostname that load-balances to healthy filers,
// or have S3 server proxy the upload to a healthy filer
return fmt.Sprintf("http://%s%s/%s/%04d_%s.part", return fmt.Sprintf("http://%s%s/%s/%04d_%s.part",
s3a.getFilerAddress().ToHttpAddress(), s3a.genUploadsFolder(bucket), uploadID, partID, uuid.NewString()) s3a.getFilerAddress().ToHttpAddress(), s3a.genUploadsFolder(bucket), uploadID, partID, uuid.NewString())
} }

Loading…
Cancel
Save