When the user POSTS to my server, should I store the picture in the body of the queue, and then have the "worker" servers pull it out and resize/upload to S3?
The r开发者_如何学Ceason I'm using a queue is because resizing/uploading 20 images to S3 takes a long time.
Amazon's Simple Queue Service may be used to maintain communication between your worker and frontend servers, but keep in mind that it only supports messages up to 64kb, meaning it won't be possible to keep the images in the queue. This is probably best, filesystems are designed to maintain large files, queue implementations generally aren't.
I would have the user upload directly to S3, then use the SQS to coordinate communication between your worker servers as they process the images and return them to S3.
精彩评论