Matt,When you say 2-web roles, you don't mean 2-instances of the same web role ... right ?(If 2-instances of the same webrole, then they are going to access the same storage account ... wouldn't this causes transactional problems ?)
So I think you mean 2 different web roles that have different end-points and store their data in different storage locations + enable replication between them as you would go with any 2 "regular" servers on a network.
Did I get you right ?If so, how does the application communicate with these 2 - web roles when they have different urls, and does failover work.
Thanks, a friend of mine has been migrating it to Build 888 today (AFAIK blog post will published).
Alex
They‘re are different VHDs
Alex
From: rav...@googlegroups.com [mailto:rav...@googlegroups.com]
On Behalf Of jalchr
Sent: Samstag, 28. April 2012 11:13
To: rav...@googlegroups.com
Subject: [RavenDB] Re: Azure Hosting
Matt,
Hi,
at the moment we’re facing some issues.
I’ll post a link to the sources when available here.
Alex
Hi,
at the moment we’re facing some issues.
I’ll post a link to the sources when available here.
Alex
You're right about the SLA there. Allthough you can probably turn off the automatic updating, but if something happens to the rack your node is in - you're in trouble. Are you guys working on a load balanced version of what Mike Hanley is doing in his article?
+1
Alex
From: rav...@googlegroups.com [mailto:rav...@googlegroups.com]
On Behalf Of Matt Warren
Sent: Mittwoch, 2. Mai 2012 11:11
To: rav...@googlegroups.com
Subject: Re: [RavenDB] Re: Azure Hosting
That's cool, it's much better to have an "official" hosted version that just works!
// default AzureDirectory stores cache in local temp folder AzureDirectory azureDirectory = new AzureDirectory(CloudStorageAccount.FromConfigurationSetting("blobStorage"), "TestCatalog6"); bool findexExists = IndexReader.IndexExists(azureDirectory); IndexWriter indexWriter = null; while (indexWriter == null) { try { indexWriter = new IndexWriter(azureDirectory, new StandardAnalyzer(), !IndexReader.IndexExists(azureDirectory)); } catch (LockObtainFailedException) { Console.WriteLine("Lock is taken, Hit 'Y' to clear the lock, or anything else to try again"); if (Console.ReadLine().ToLower().Trim() == "y" ) azureDirectory.ClearLock("write.lock"); } }; Console.WriteLine("IndexWriter lock obtained, this process has exclusive write access to index"); indexWriter.SetRAMBufferSizeMB(10.0); indexWriter.SetUseCompoundFile(false); indexWriter.SetMaxMergeDocs(10000); indexWriter.SetMergeFactor(100); for (int iDoc = 0; iDoc < 10000; iDoc++) { if (iDoc % 10 == 0) Console.WriteLine(iDoc); Document doc = new Document(); doc.Add(new Field("id", DateTime.Now.ToFileTimeUtc().ToString(), Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)); doc.Add(new Field("Title", GeneratePhrase(10), Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)); doc.Add(new Field("Body", GeneratePhrase(40), Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)); indexWriter.AddDocument(doc); } Console.WriteLine("Total docs is {0}", indexWriter.DocCount()); indexWriter.Close(); IndexSearcher searcher; using (new AutoStopWatch("Creating searcher")) { searcher = new IndexSearcher(azureDirectory); } SearchForPhrase(searcher, "dog"); SearchForPhrase(searcher, _random.Next(32768).ToString()); SearchForPhrase(searcher, _random.Next(32768).ToString()); }
HiIf a working example for multiple instances for windows azure?
воскресенье, 27 мая 2012 г., 16:26:36 UTC+6 пользователь Oren Eini написал:
As soon as you change the storage type from munin to esent it fails with:
“Could not open transactional storage: b:\Data\Data”
And it fails even on:
NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(port);
But I suppose the second one is due to the second role instance being misconfigured and trying to use the same port of the first instance.
.m
From: rav...@googlegroups.com [mailto:rav...@googlegroups.com]
On Behalf Of Sebastian Burgstaller
Sent: martedì 16 ottobre 2012 10.19
To: rav...@googlegroups.com
Subject: [RavenDB] Re: Azure Hosting
Hi André!
Do you mean hosting RavenDB on the same web role where you host your web site? This would be especially interesting to me as we are a new BisSpark member and get exactly 2 small instances per month for free. So in order to meet the SLA requirement we would have to run RavenDB on both instances. I guess this would require RavenDB to run in embedded mode, or are there other options?
BTW: I have found the following implementation of a scaling RavenDB worker role. Whenever you add a new instance it automatically adds itself to the replication document and sets up a new VHD.
Looks nice to me!
Best Regards
Sebastian
On Tuesday, May 1, 2012 3:47:26 AM UTC+2, André Andersen wrote:
I talked to a technical azure evangelist from Microsoft the other day regarding Azure and RavenDB. Allthough he didn't have experience with Raven in particular, his idea was that you would host the RavenDB instances in the same deployment as your web project (or whatever you're doing). This brings me to a question:
- What options do we have when it comes to load balancing RavenDB with replication (I presume master-master replication due to lack of experience).
- What's the best practice when configuring the DocumentStore in this sense, so it uses different instances (load balanced)?
“{Disk IO Error}”
In the event log:
Raven (7812) b:\Data\Datafc8e4b47-ffa7-4c9b-bc3c-bdf11a9738e1: An attempt to create the folder "b:\" failed with system error 183 (0x000000b7): "Cannot create a file when that file already exists. ". The create folder operation will fail with error -1022 (0xfffffc02).
Where “b:\” is the path of the mounted drive.
Interesting isn’t it? :-)
I do not define anything:
- running locally using the emulator;
- mounted the cloud drive, and the Azure API returns me as “path” of the drive b:\;
- created a config:
var config = new RavenConfiguration
{
DataDirectory = _dataDrive.LocalPath.EndsWith("\\")
? _dataDrive.LocalPath + "Data\\"
: _dataDrive.LocalPath + "\\Data\\",
AnonymousUserAccessMode = anonymousUserAccessMode,
HttpCompression = httpCompression,
DefaultStorageTypeName = defaultStorageTypeName,
Port = port,
PluginsDirectory = "Plugins"
};
Trying to start the db I get the above exception:
_database = new DocumentDatabase(config);
In my environment _dataDrive.LocalPath is “b:\”
I’ve not written any code, I’m just playing with the sample from Github:
https://github.com/SaschaDittmann/RavenDbOnAzure
Exactly the same exception.
For a chat, yes, for a conf-call not now, tomorrow the whole day.
I’ve solved the issue:
The full directory path to the data directory must exists, ESENT will not create it, creating the full path b:\data (by default when the cloud drive is mounted the Data directory does not exists) ESENT does not complain any more.
Now I have another issue at: _server.StartListening();
It fails adding the listening prefix, but I’ll have a look tomorrow.
If you still want to do the conf call tomorrow I’ll be available.
Cheers,
.m
No way, it does not work.
In the end now I have it running with replica setup, the followed steps (and fixes in the downloaded sample) are:
- When running with esent:
o The “Data” directory must be “manually” created otherwise esent complains with a Disk IO Error;
o The “Tenants” directory must be “manually” created, same issue as above;
- The downloaded sample:
o has a misconfigured endpoint in the role configuration: the endpoint must be http and not tcp;
o utilizes the RoleEnvironment.CurrentRoleInstance.Id to setup the vhd name but, at least in the development emulator, the id changes at each deployment and is prefixed with the deployment id, thus each time the vhd is new and you lose access to the previous debug session data; I managed to create a vhd name using RoleEnvironment.CurrentRoleInstance.Id value but removing the RoleEnvironment.DeploymentId portion;
- In my environment running with more than 1 instance breaks everything because of the way the emulator assigns dynamic ports to the second instance, resulting in the choice of an already used port, I suppose it does something like “current port” + 1, thus 8080 + 1 = 8081…exception;
- I have also removed all the references to the embedded version;
The next step is to upgrade everything to build 960, since the sample is running on 888.
.m
From: rav...@googlegroups.com [mailto:rav...@googlegroups.com]
On Behalf Of Maverix
Sent: mercoledì 17 ottobre 2012 00.50
To: rav...@googlegroups.com
Subject: Re: [RavenDB] Re: Azure Hosting
<Runtime executionContext="elevated" />
Add the above line in your ServiceDefinition.csdef in the azure project
Add it just after the definition of the Worker Role you are running ravenDb in
--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.