segunda-feira, 16 de abril de 2012 06:56
On azure is it better, in term of performance, to store images in a database or in a folder
in particular when we have a large number of images?
Todas as Respostas
segunda-feira, 16 de abril de 2012 07:25
You should use the blob storage to store images. This will give you the best performance and the lowest cost compared to database.
- Database: Expensive, doesn't scale that easily
- Local folder: Not persisted (if your machine is deleted, so is your data)
- Blob storage: cheap, very fast, will increase performance of your website (you'll be loading data from different domains)
Sandrino Di Mattia | Twitter: http://twitter.com/sandrinodm | Azure Blog: http://fabriccontroller.net/blog | Blog: http://sandrinodimattia.net/blog
quarta-feira, 25 de abril de 2012 03:55
The right answer really depends on the nature of your application--particularly on how often a given image is accessed by both users and the application.
From a performance perspective, you're generally better off using blob storage. Blobs also have the advantage of being easy to connect with the CDN.
However, from a cost perspective, if your images are accessed frequently, you might be better off putting them in a database. There's a cost in blob storage both for the amount of data stored, and per-transaction. Transaction fees are "only" $0.01 per 10,000, but they can add up surprisingly fast (for example, if you periodically scan the files to determine counts, sizes, names, new content, or something like that). In the DB, it's only based on the space used; no per-transaction fees.
Another option is to use either blob storage or the DB as your primary store, and use local Windows Azure storage as a cache. For blob storage as the primary, after the initial transfer, there wouldn't be any additional per-transaction fees. For SQL Azure as the primary, it would be slower than blobs on first access only.
- Marcado como Resposta marck68 quarta-feira, 25 de abril de 2012 07:01