S3-Uploads
S3-Uploads copied to clipboard
Large amount of redundant traffic
On one of our sites that uses s3-uploads I noticed that the bucket showed a large amount of excess egress traffic.
It seems that the image is being uploaded, then downloaded repeatedly, once for each image processing task.
I think it's mostly happening with side-loaded images. My suspicion is based on there being a bunch of files that show up and then deleted in the uploads/tmp/
dir in the bucket. I also found a function called filter_sideload_move_temp_file_to_s3
that appears to be intentionally moving side-loaded images to the bucket for processing.
The comment on filter_sideload_move_temp_file_to_s3
references the wordpress ticket https://core.trac.wordpress.org/ticket/29257
The ticket page shows as fixed now. Do we still need to move the image and do processing on the bucket, or is there a way to do it more efficiently?
It seems like it'd be easier to do the image processing in /tmp
. I'm going to see if there's a way to add filters or something that will move processing over there, then just copy the files into the uploads dir when done. Might take a bit to get to it though so if anyone else has a solution in the meantime feel free to post it.