3

I'm thinking of running a Riak cluster on EC2 but I'm concerned that if I launch a bunch of Riak nodes if they end up running on the same physical host then they will fail at the same time. Is there a way to specify that I would like to spread a group of instances over as many physical hosts as possible?

2
  • 3
    The recommended approach would be to launch instances into different availability zones within the same region.
    – cyberx86
    Jan 5, 2014 at 6:49
  • 1
    Welcome to The Cloud.
    – ewwhite
    Jan 5, 2014 at 15:11

2 Answers 2

3

That's what availability zones are for. They guarantee that two EC2 instances are on different physical servers, but still in the same geographical location.

Here is the documentation about availability zones.

5
  • yes, but there are only 5 availability zones in US-east. What if I have >5 nodes in my cluster?
    – jz87
    Jan 5, 2014 at 6:56
  • I think you'll either have to accept that you can have more availability zones than 5, or you also start replicating between different locations (more delay). You can still create more than 5 EC2 instances, for example put 2 into each availability zone but then riak would have to ensure redundancy between at least 3 hosts, so N=3, to make sure data is replicated between at least two availability zones. Unfortunately, with riak's architecture, there seems to be no way to say N=2 but never replication between node 1 and node 2 because they are in the same availability zone.
    – replay
    Jan 5, 2014 at 7:13
  • With millions of servers chances are you're already winding up on different physical hosts, anyways.
    – ceejayoz
    Jan 5, 2014 at 15:33
  • I read somewhere that if you start servers one after another there is a high probability that they will end up on the same physical host.
    – jz87
    Jan 5, 2014 at 21:34
  • 1
    I don't know what kind of data you have, but personally I wouldn't rely on probabilities to ensure the safety of my data. So even if there is only a chance of 1/1000 to get two EC2 instances on the same physical host, I couldn't tell my boss it's safe.
    – replay
    Jan 6, 2014 at 5:15
-1

Use ec2 dedicated instances and/or launch the largest size instances available in a region/zone.

2
  • Is that what dedicated means? I thought it only guarantees you won't be sharing with someone else. Does it guarantee that you won't be sharing with yourself?
    – jz87
    Jan 5, 2014 at 8:08
  • Read the description and also my second suggestion to use max instance sizes.
    – dmourati
    Jan 5, 2014 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .