Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notification about azure blob object changes

Can I somehow subscribe for notifications about Azure's blob object changes?

My purpose is to delegate file uploads to the client using SAS and lately (after upload is complete) update the database. It looks like I need to continuously check blob's state, but it is quite resource consuming process.

like image 380
CheatEx Avatar asked Oct 10 '11 07:10

CheatEx


2 Answers

You can't be notified by the Blob Storage about a change made to a blob, but as you point out, you can monitor it, requesting the ETag on a scheduled basis to see if it's done.

That being said, the cost to monitor a blob (or even a whole container) can be close to negligible if correctly implemented. Pinging the Blob Storage once per second costs you roughly $2.5 / month. Then, by using some heuristic you can probably lower this cost to $0.25 (one check per 10s on average). At this point, it's not really interesting to try to optimize more.

like image 81
Joannes Vermorel Avatar answered Sep 22 '22 10:09

Joannes Vermorel


You can now do this using Azure functions

  1. Create a blob trigger by specifying your storage account connection string and your container/{name}

  2. In outputs, select the place where you want your notification to go to

like image 20
raghav710 Avatar answered Sep 22 '22 10:09

raghav710