Repository navigation
feat(seaweedfs): limit single PUT request size to 5GB - #2414
Conversation
Add nginx ingress annotation to limit single PUT request body size to 5GB for both system and tenant SeaweedFS S3 endpoints. This enforces the use of S3 multipart upload API for files larger than 5GB, which prevents issues commonly seen with large monolithic uploads and reduces support load. Changes: - Set proxy-body-size to "5g" in system seaweedfs values.yaml - Set proxy-body-size to "5g" in tenant seaweedfs template - Add explanatory comments for the limitation Signed-off-by: IvanHunters <[email protected]>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a hard limit on the size of single PUT requests handled by SeaweedFS S3 endpoints. By restricting individual uploads to 5GB, the change forces the use of multipart uploads for larger files, which mitigates common issues such as connection timeouts, memory pressure, and data corruption. This adjustment aligns the platform with standard object storage practices and improves overall reliability for end users. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTwo SeaweedFS Helm/Kubernetes ingress configuration files were updated: the NGINX Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the SeaweedFS ingress configuration in both the extra and system packages, changing the proxy-body-size from unlimited to 5GB to enforce multipart uploads for large files. Feedback includes a recommendation to align the extra package's ingress annotations with the system package by adding buffering and timeout settings, and to move these hardcoded template values into values.yaml according to the project style guide. Additionally, the PR needs to be updated to include a mandatory release-note block in the description and ensure all commits follow the Conventional Commits format with a Signed-off-by: trailer.
| # Limit single PUT request to 5GB to enforce multipart uploads for large files. | ||
| # This prevents issues with large file uploads and reduces support load. | ||
| # For files >5GB, clients must use S3 multipart upload API. | ||
| nginx.ingress.kubernetes.io/proxy-body-size: "5g" |
There was a problem hiding this comment.
To fully address the issues mentioned in the PR motivation (connection timeouts and memory pressure), the tenant ingress should also include annotations to disable request buffering and increase timeouts, matching the configuration in the system SeaweedFS. Additionally, per the project style guide, configuration-level changes should ideally be defined in the package root values.yaml rather than hardcoded in the template, which would also allow users to override these values if necessary.
# Limit single PUT request to 5GB and optimize for large uploads.
# This prevents issues with large file uploads and reduces support load.
# For files >5GB, clients must use S3 multipart upload API.
nginx.ingress.kubernetes.io/proxy-body-size: "5g"
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/client-body-timeout: "3600"
nginx.ingress.kubernetes.io/client-header-timeout: "120"
nginx.ingress.kubernetes.io/service-upstream: "true"References
- For configuration-level changes: suggest overrides in the package root values.yaml. (link)
| host: "seaweedfs.demo.cozystack.io" | ||
| annotations: | ||
| nginx.ingress.kubernetes.io/proxy-body-size: "0" | ||
| # Limit single PUT request to 5GB to enforce multipart uploads for large files. |
There was a problem hiding this comment.
The PR body is missing a release-note block, which is required by the project guidelines. Please add a block following the format: release-note\ntype(scope): human-readable changelog entry\n. Also, ensure all commits follow the Conventional Commits format and have a Signed-off-by: trailer.
Align tenant SeaweedFS S3 ingress annotations with system configuration by adding proxy buffering, request buffering, and timeout settings. This ensures consistent handling of large file uploads and prevents connection timeout issues for tenant buckets. Changes: - Add proxy-buffering and proxy-request-buffering annotations - Add proxy-read-timeout, proxy-send-timeout timeouts (3600s) - Add client-body-timeout and client-header-timeout settings - Add service-upstream annotation for load balancing Signed-off-by: IvanHunters <[email protected]>
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
LGTM — small, well-scoped enforcement of the S3 single-PUT 5GB cap, with the tenant ingress brought into parity with the existing system annotation set.
Business context: SeaweedFS S3 endpoints currently accept unlimited single-PUT bodies (proxy-body-size: "0"), which leads to long-running uploads, memory pressure, and connection timeouts; this PR caps single PUTs at 5GB to push large uploads to multipart, matching AWS S3 semantics.
Non-blocking follow-ups
- The PR body has no
release-noteblock, which the project's pull-request template marks as expected. The PR title is descriptive enough to serve as the changelog entry, but filling in an explicitrelease-note ...block keeps the auto-generated changelog clean.
Summary
Limit single PUT request body size to 5GB for SeaweedFS S3 endpoints to enforce multipart upload usage for large files.
Motivation
Large monolithic file uploads via single PUT requests (files >5GB) frequently cause issues in production environments:
AWS S3 and other object storage providers recommend using multipart uploads for files larger than 100MB, with multipart being mandatory for files >5GB.
Changes
nginx.ingress.kubernetes.io/proxy-body-size: "5g"in system SeaweedFS configurationnginx.ingress.kubernetes.io/proxy-body-size: "5g"in tenant SeaweedFS template (hardcoded, non-overridable)Impact
For users:
Platform benefits:
Testing
Summary by CodeRabbit