Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run RavenDb in Azure within a worker role

A few months ago I was playing around with RavenDb & Azure and I successfully got it running by hosting the server within a worker role by following this excellent blog post.

However, I've just created a new project and tried following the article again, but it seems much as changed with the raven files since that blog post. Notably :

  • There isn't simply a 'RavenDB' NuGet package - there are a bunch of them: RavenDB Client, RavenDB Database, RavenDB Embedded, RavenDB Server & RavenDB Asp.Net Hosted server.
  • When installing 'RavenDB Server' (this seems most appropriate for a worker role) it no longer has the same .dlls that the article says to reference, and there is no longer a .xap file. I've tried simply referencing the Raven.Database .dll, but when I try to start it, I get an InvalidOperation exception: "Different number of tables stored in the Munin file".

Can anyone provide me with the steps required to run RavenDB in a worker role?

Is running RavenDB as a worker role the best way to go, or is there a more appropriate way of running it in Azure? (It needs to be consumed by multiple web sites).

like image 331
David Masters Avatar asked Feb 18 '13 10:02

David Masters


Video Answer


1 Answers

I would highly recommend using one of the concrete Virtual Machine (IaaS) offerings to run RavenDB. RavenDB isn't designed for elasticity in a way that would be meaningful for you to be able to just increase or decrease the number of running workers, so you really don't get anything from the worker role functionality.

like image 123
David Pfeffer Avatar answered Sep 21 '22 16:09

David Pfeffer