mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:49:06 +08:00
fe05fdae24
This commit adds an `enable_s3_transfer_acceleration` site setting, which is hidden to begin with. We are adding this because in certain regions, using https://aws.amazon.com/s3/transfer-acceleration/ can drastically speed up uploads, sometimes as much as 70% in certain regions depending on the target bucket region. This is important for us because we have direct S3 multipart uploads enabled everywhere on our hosting. To start, we only want this on the uploads bucket, not the backup one. Also, this will accelerate both uploads **and** downloads, depending on whether a presigned URL is used for downloading. This is the case when secure uploads is enabled, not anywhere else at this time. To enable the S3 acceleration on downloads more generally would be a more in-depth change, since we currently store S3 Upload record URLs like this: ``` url: "//test.s3.dualstack.us-east-2.amazonaws.com/original/2X/6/123456.png" ``` For acceleration, `s3.dualstack` would need to be changed to `s3-accelerate.dualstack` here. Note that for this to have any effect, Transfer Acceleration must be enabled on the S3 bucket used for uploads per https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration-examples.html. |
||
---|---|---|
.. | ||
base_store.rb | ||
local_store.rb | ||
s3_store.rb | ||
to_s3_migration.rb |