0

I am trying to build an application in Windows Azure that requires notifications - so I am using Http Polling, but I got a problem. I need to get to the very same instance of my web role so I can maintain the polling. I found a solution with web farm request rewriting(adding extra proxy role), but I don't like the solution.

Soo my question: Is there a way to do stateless polling and if there is someone that implemented this - can you give me a hint or link?

Ilian Iliev
  • 1,716
  • 1
  • 12
  • 12

1 Answers1

1

You just need the poll request to thunk through to some sort of shared 'stateful' layer. Probably the best candidate would be to use the Windows Azure caching service. http://www.windowsazure.com/en-us/home/tour/caching/ you could also just use storage and choosing between the two will largely be determined by how busy your app is; i.e. whether it is cheaper to pay a fixed cost for some cache space with no per request charge or pay almost nothing for your storage space but pay a per request charge.

By taking this approach it does not matter if susequent polling requests end up routed to a different instance. To me this is best practice regardless; I've seen some fugly bugs pop up when people assume session affinity when making AJAX calls back into an Azure web role.

Chris J.T. Auld
  • 946
  • 4
  • 8
  • I answered a question on the MSDN Forums which was of a similar nature. You might want to check the answers here: http://social.msdn.microsoft.com/Forums/en-GB/windowsazuredata/thread/9f99c21d-7025-4add-977f-45bc769bfa55 – cory-fowler Dec 21 '11 at 18:42