In order to cache properly you need to use a predictable naming convention that takes into account all the different ways that you want your image displayed, i.e. If you have multiple app servers then you'll want to cache to a central file-system to increase your cache-hit ratio and reduce the amount of space you will need. The next time someone asks for that image, check to see if it has already been generated, if it has just return that. So how do you support thousands of clients? We'll you cache it so you only have to generate the image once. Ok first problem is that resizing an image with any language takes a little processing time. There is a full API for uploading docs etc The URL's are kind of long e.g.Īdd the =s paramter to scale the image, cool! e.g. Google docs now supports all file types, so you can load the images up to a Google docs folder, and share the folder for public access. Check on EC2 site for what's availableĪnother option is Google. It used Amazon S3 for image storage, original and scales, and could feed them through to Amazons CDN service (Cloud Front). There are some AMI images for Amazons EC2 service to do image scaling. The ImageCache and Image Exact Sizes solutions from the Drupal community might do this, and like most solutions OSS use the libraries from ImageMagik You can implement this on your existing server, so I guess it's a solution well suited for your budget. With my system at least you totally skip the overhead of checking the cache, thus further reducing PHP interaction. Whatever you do you'll have to use a library like this (GD or libmagick or so) so that's unavoidable.
0 Comments
Leave a Reply. |