Leasing Blobs on Azure Blob Storage Service establishes a lock for write and delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
Personally prefer to lease a blob for a short period of time, which I renew until I decide to release the lease. To some, it might seem more convenient to lease a blob indefinitely and to release it when they’re done. But on Azure, Role instances can be taken offline for a number of reasons like maintenance updates. Blobs that are indefinitely leased can eventually be leased by a process that no longer exists.
Granted that leasing a blob for a short period of time and renewing the lease costs more, but it’s essential for highly scalable Azure Cloud Services. In situations where a process that had the original lease is prevented from completing its task, an other Role can take over.
Renewing blob leases requires extra work, but it’s really worth it when you think about it.
Continue Reading…
Like this:
Like Loading...