We were having some major issues with image resizing. This was entirely my own fault as in my last game I used my digital SLR camera which produces images that are around 7MB. So I increased the upload limit from 5MB to 8MB.
What I did not account for was the memory issues this would cause when you tried to resized 12 images of 7MB each. It was crashing the server and having an impact on the overall site.
I contacted my hosting provider and asked if there was anything they could do. But there wasn’t really and they suggested using Amazon’s EC2 virtual servers to do the heavy lifting of image resizing.
So I gave this a go and it’s worked. Images are now stored on the main server but requires to resize them to the varying sizes are now handled elsewhere on EC2.
The benefits of this are two fold. The first is that the main web server is now free to serve the HTML of the site as quickly as possible without being bogged down by image resizing. The second is that because another server is handling the request elsewhere when you upload images you get the page back much quicker. The other server then resizes the images independently and loads then as they finish. You can then continue editing your report instead of always waiting on the image upload.