This project is read-only.

Add support for multiple instances


Investigate potential of adding support for multiple role instances


abediggs wrote Nov 10, 2012 at 9:49 PM

One way to do this would be with Blob leases and an eventing mechanism through the service bus to all instances of the ftp role.

Steve Marx shows how you can manage instance privileges with blob leases:

Eventing between role instances is demonstrated here:

The scheme would be as follows:
1) Instance receives ftp request from azure load balancer, and attempts to acquire lease on appropriate root directory blob.
2a) If acquired lease, carry on, renewing lease until the client closes the connection or it times out.
2b) Else, broadcast the request via the service bus to all other currently-running instances. The one that has the lease will be able to manage the request.

In this way, you can maintain your one-instance-one-datastore access pattern, while adding n instances. Because blob leases expire (and that expiration is managed by the platform), even when an instance crashes with leases intact they would become available to clients again soon (by default within 60 seconds).


wrote Feb 14, 2013 at 8:06 PM

wrote Dec 16, 2017 at 3:13 AM