4
votes

In Azure how can multiple Web Roles read from the same Lucene.net index that is stored in Blob Storage?

BTW - I'm using the Lucene.Net.Store.Azure library from NuGet to persist my Lucene.net index to Azure Blob Storage.

The problem I'm encountering is outlined below in the following diagram:

enter image description here

One idea I had was to ensure that each of my Web Roles acted in "read only" mode, and did not ever write to the index. I could create a separate Worker Role to the writing. I'm not sure if that would work though.

Another idea I had was to make multiple copies of the index; one for each Web Role. It seems kind of inefficient though.

1

1 Answers

2
votes

Your first idea is good. I would also suggest implementing a separate worker role to write to the index. Since Azure SLA required two servers per any role, you can implementing a queuing or blob leasing mechanism to ensure that two workers do not try to write to the index at the same time.