Andiih
Andiih

Reputation: 12413

Azure Website and Worker Role

I'm looking at re-architecting an existing Azure Web Role which contains multiple websites. I want to move the heavy tasks (image resizing, packaging and zipping) that currently runs in the Web Role to a Worker Role. They are non-critical so I will end up with a single instance of the Worker Role and multiple instances of the Web Role. However, I also want to move some of the low volume sites that run within the Web Role out to Azure Websites to facilitate minor deploys without changing the entire package. This includes the admin and backend sites, which are low volume, but will need access to the Worker Role. Will an Azure Website be able to communicate with a Worker Role endpoint? Or is this a daft idea?

Upvotes: 2

Views: 635

Answers (1)

Smetad Anarkist
Smetad Anarkist

Reputation: 898

I think you always have the option of having your web role/web site upload the image that should be resized to your Azure Storage. And then you can place a message on the queue that the worker role reads. It then loads the image from storage and performs your tasks on it.

The storage and queues are accessible from outside Azure using shared keys. But since it's a web role/web site, you could store your keys somewhat safely in web.config or similar.

I also think that you can have a worker role expose a public/external endpoint. But it seems less safe than having the web talk with storage and queues.

Upvotes: 2

Related Questions