Azure - 2x extra small or a single small instance
Asked Answered
B

3

10

Starting out with Windows Azure, but how do I know which is better to handle web-traffic and a background processor. Would 2x extra small instances be better or a single small instance.

If I were to use a small instance, I would make the background processor in the web-role, what are the cons of doing it this way?

In future this would also apply where multiple small instances or fewer big instances.

Is there some sort of tool to help decide which way I'll be able to get the best bang for my buck etc.?

I know that for the Microsoft's SLA to be met 2x instances need to be running.

Boogie answered 3/6, 2011 at 7:5 Comment(0)
V
12

It is better to have 2 extra-small rather that 1 small instance as far service availability is concerned. That being said there are multiple gotchas:

  • You need to put your 2 VMs into 2 distinct upgrade domains (done in role definition file).
  • Your app needs to support multi-VM, aka not rely on non-shared session state.
  • Better availability does not mean better performance, in particular, local cache is basically halved.

Size of cache and overall difficulties at spreading an app over many small VMs typically explain why most dev stick to a single but larger VM until they reach a point that really calls for scaling out (which is likely to never happen for most apps anyway).

Vday answered 3/6, 2011 at 9:47 Comment(2)
+1 for telling me about the <b>upgrade domain</b>, I wasn't aware of such a feature till you told me. Is there a way to set up some sort of performance monitoring ? Want to know when the server is under-powered and time to increaseBoogie
In my experience, performance monitoring is much better done when finely driven by your domain model (aka the very specifics of YOUR app). That mean you've got to setup you're very specific counters, and acts upon them. In practice, I would suggest not to worry too much about scaling out at the beginning.Vday
A
3

For SLA purposes, you need at least two instances, as Joannes alluded to when talking about service availability. Other things to consider:

  • It's easy to handle background tasks in a web role - you get the same OnStart() and Run() as a worker role.
  • When scaling, remember that, if you combine functionality into a single role, it all scales together as a single unit. So, if your background processing is being starved out due to excessive web traffic, you'll want to consider splitting them into separate roles
  • Extra Small instances have shared CPU. More importantly, they're going to have less network throughput. A Small instance has approx. 100Mbps. An Extra Small instance is a fraction of that (I'll need to look up the number). And... memory is 768MB vs. 1.75GB for a Small.
  • If you have an MSDN subscription, the included Windows Azure subscription comes with 1,500 CPU-hours monthly. But... that excludes Extra Small instances. You'll pay for those. Be sure to use Small when using your MSDN-supplied account. Edit: MSDN allowances are now friendly to extra-small instances.
Agentival answered 3/6, 2011 at 13:33 Comment(0)
E
1

I guess we can't really know without usage figures and more info and even then I think only time will tell but...

Why not sign up for one of the free trial accounts that gives you an extra small instance. See if your app copes well enough then when it goes live get a second one for load balancing, SLA etc.
If it doesn't cope then get a bigger one - but I'd still be inclined to go for a second one - unless you don't care if it becomes unavailable at random times. MS will apply security patches and will reboot your instances without asking so the second instance will prevent your site being unavailable as they'll update them separately.

It doesn't look particularly challenging to upgrade to bigger instances anyway should it become a sell-out.

If you've got an MSDN subscription (premium level, I think) then you get enough free hours to run 2 small instances.

From what little I've seen I don't think there's any real 'con' in adding the background processor. After all you're paying for a whole machine so you might as well make it work for it's money. That was kind of the impression they gave at the recent tech days thingy I saw.

Try it and see...

Eolanda answered 3/6, 2011 at 7:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.