Reputation: 4414
I'm trying to calculate costs of delivering, viewing and clicking images using Azure services. I want to avoid using as much CPU as possible but I'm a bit confused. When someone navigates to an image that's in BLOB storage would that count as a request to my web site instance or is that purely a storage transaction?
Also since I need to track the viewing of the image is it possible to get this metric through the BLOB storage instead of sending an ajax hit back to my server? I'm trying to save round trips back to the server.
Based on this article (benchmarks) it shows that 2 medium instances can support ~100 requests/sec therefore around 263 million requests/month. The website I'm building will easily need hundreds of millions of views to be tracked and also millions of clicks so I want to see if I can avoid the costs of requests as they look to be the most expensive compared to bandwidth/storage.
Upvotes: 2
Views: 139
Reputation: 71030
Blob Storage is a completely independent service from your Cloud Service role instances (or Virtual Machine instances, or Web Sites instances). If you embed a URL to a blob, within an <img>
tag, then the browser will make the request directly to Blob storage. The URL would actually start with http://yourname.blob.core.windows.net/container/blobname
, which is a separate endpoint from http://yourservice.cloudapp.net
.
If, on the other hand, your request handler takes the responsibility of downloading the blob to the machine instance and then pushing it back to the user as part of the response stream, yes you'll take a hit on cpu and bandwidth (and memory).
If you choose the former method, you can collect stats by enabling storage analytics which give a comprehensive view of both individual downloads (including source IP address) as well as hourly rollups.
Upvotes: 2