-3

My current extra small vm reaches the limits, so I decided to create a second extra small instance and add the two into a availability set so my service is everytime available and through the load balancer also the load is balanced. My question is know what will happen with the data? Will it be on both the same? Because i need the same data available on both! For example:

Request1 -> vm1 -> adds data Request2 -> vm2 -> want to read data that was firstly put on vm1

Or even a lot simplier: If I ran a wordpressblog and add a blog,it must be available on both!

Michi

Michael
  • 113
  • 3
  • I'm surprised this question was closed. From a virtual, cloud-based server standpoint, it's critical to understand ephemeral non-shared storage vs. common, shareable storage. And in Windows Azure, this equates to Table / Blob storage, SQL Database, or some other database using Blob Storage for its backing store. How is this not server-related? It's cloud infrastructure. It's not the same as on-premises server config, and I can't imagine ServerFault being limited to physical hardware and related infrastructure. – David Makogon May 27 '13 at 20:53

1 Answers1

0

Each virtual machine is backed by its own vhd, which resides in a Page Blob in Azure Storage. This is not a good place to store any type of content that needs to be shared across multiple instances (and in-proc session state will also be limited to the running instance of that virtual machine). You need to store your session state and any other persisted data in a common place accessible to both Virtual Machines, but do not store content directly on the vhd's main disk, or the temporary disk.

For session state, you can easily set up Windows Azure SQL Database (basically sql-as-a-service) and use that as your session state provider. Or you could run memcached, use Table Storage, or choose something entirely different - I'll leave other ideas to your imagination.

Same goes for running WordPress - content would need to be in a common data store. Since WordPress uses MySQL, you can set up MySQL in an independent virtual machin instance, or subscribe to a MySQL database via the Azure Store.

One other option is to store content in Blob storage, which is completely independent of any virtual machines you create, and very easy to access. Blob storage, along with Table storage, has excellent language SDK support that's built atop the REST API (currently .net, php, java, python, node, and ruby SDKs). You can grab the SDK of choice from the Azure download page. You can also peruse the source code, in the github repo.

David Makogon
  • 2,767
  • 1
  • 19
  • 29