[prev in list] [next in list] [prev in thread] [next in thread]
List: cassandra-user
Subject: Re: Use NetworkTopologyStrategy for single data center and add data centers later
From: Carl Mueller <carl.mueller () smartthings ! com ! INVALID>
Date: 2021-01-28 1:00:26
Message-ID: CAFjxgDx9PO9r0-ci_gO2LMAoFk-2v1inbqD-JtJs7sk3kTa_SQ () mail ! gmail ! com
[Download RAW message or body]
Yes, perform that as soon as possible.
When you add a new datacenter, keyspaces that are SimpleStrategy (don't
forget about system_traces and system_distributed) won't work.
On Sat, Dec 19, 2020 at 12:38 PM Aaron Ploetz <aaronploetz@gmail.com> wrote:
> Yes, you absolutely can (and should) use NetworkTopologyStrategy with a
> single data center. In fact, I would argue that SimpleStrategy should
> almost never be used. But that's just me.
>
> Thanks,
>
> Aaron
>
>
> On Sat, Dec 19, 2020 at 3:21 AM Manu Chadha <manu.chadha@hotmail.com>
> wrote:
>
>> Is it possible to use NetworkTopologyStrategy when creating a keyspace and
>> add data centers later?
>>
>> I am just starting with an MVP application and I don't expect much
>> traffic or data. Thus I have created only one data center. However, I'll
>> like to add more data centers later if needed
>>
>> I notice that the replication factor for each data center needs to be
>> specified at the time of keyspace creation
>>
>> CREATE KEYSPACE "Excalibur"
>>
>> WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc1' : 3, 'dc2' : 2};
>>
>> As I only have dc1 at the moment, could I just do
>>
>> CREATE KEYSPACE "Excalibur"
>>
>> WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc1' : 3};
>>
>> and when I have another datacenter say dc2, could I edit the Excalibur
>> keyspace?
>>
>> ALTER KEYSPACE "Excalibur"
>>
>> WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc2' : 2};
>>
>>
>>
>> or can I start with SimpleStrategy now and change to
>> NetworkTopologyStrategy later? I suspect this might not work as I think
>> this needs changing snitch etc.
>>
>>
>>
>>
>>
>> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
>> Windows 10
>>
>>
>>
>
[Attachment #3 (text/html)]
<div dir="ltr">Yes, perform that as soon as possible. <br><br>When you add a new \
datacenter, keyspaces that are SimpleStrategy (don't forget about system_traces \
and system_distributed) won't work. </div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Sat, Dec 19, 2020 at 12:38 PM Aaron Ploetz <<a \
href="mailto:aaronploetz@gmail.com">aaronploetz@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Yes, \
you absolutely can (and should) use NetworkTopologyStrategy with a single data \
center. In fact, I would argue that SimpleStrategy should almost never be used. \
But that's just me.<div><br></div><div>Thanks,</div><div><br></div><div>Aaron</div><div><br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 19, 2020 at 3:21 AM \
Manu Chadha <<a href="mailto:manu.chadha@hotmail.com" \
target="_blank">manu.chadha@hotmail.com</a>> wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">
<div lang="EN-GB">
<div>
<div>
<p style="margin-top:0cm;background:white;vertical-align:baseline"><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)">Is it \
possible to use </span><code><span \
style="font-size:10pt;font-family:Consolas;color:rgb(36,39,41);border:1pt none \
windowtext;padding:0cm">NetworkTopologyStrategy</span></code><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)"> when \
creating a </span><code><span \
style="font-size:10pt;font-family:Consolas;color:rgb(36,39,41);border:1pt none \
windowtext;padding:0cm">keyspace</span></code><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)"> and add \
data centers later?<u></u><u></u></span></p> <p \
style="margin-top:0cm;background:white;vertical-align:baseline;font-variant-ligatures: \
normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:i \
nherit;font-stretch:inherit;line-height:inherit;box-sizing:inherit;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)">I am \
just starting with an </span><code><span \
style="font-size:10pt;font-family:Consolas;color:rgb(36,39,41);border:1pt none \
windowtext;padding:0cm">MVP</span></code><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)"> \
application and I don't expect much traffic or data. Thus I have created only \
one data center. However, I'll like to add more data centers later if \
needed<u></u><u></u></span></p> <p \
style="margin-top:0cm;background:white;vertical-align:baseline;font-variant-ligatures: \
normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:i \
nherit;font-stretch:inherit;line-height:inherit;box-sizing:inherit;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)">I \
notice that the replication factor for each data center needs to be specified at the \
time of keyspace creation<u></u><u></u></span></p> <pre \
style="vertical-align:baseline;font-variant-ligatures:normal;font-variant-caps:normal; \
font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;box- \
sizing:inherit;max-height:600px;border-radius:5px;text-decoration-style:initial;text-decoration-color:initial;overflow:auto;word-spacing:0px"><code><span \
style="font-family:Consolas;border:1pt none windowtext;padding:0cm">CREATE KEYSPACE \
"Excalibur"<u></u><u></u></span></code></pre> <pre \
style="vertical-align:baseline"><code><span style="font-family:Consolas;border:1pt \
none windowtext;padding:0cm"> WITH REPLICATION = {'class' : \
'NetworkTopologyStrategy', 'dc1' : 3, 'dc2' : \
2};<u></u><u></u></span></code></pre> <p \
style="margin-top:0cm;background:white;vertical-align:baseline;font-variant-ligatures: \
normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:i \
nherit;font-stretch:inherit;line-height:inherit;box-sizing:inherit;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)">As I \
only have </span><code><span \
style="font-size:10pt;font-family:Consolas;color:rgb(36,39,41);border:1pt none \
windowtext;padding:0cm">dc1</span></code><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)"> at the \
moment, could I just do<u></u><u></u></span></p> <pre \
style="vertical-align:baseline;font-variant-ligatures:normal;font-variant-caps:normal; \
font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;box- \
sizing:inherit;max-height:600px;border-radius:5px;text-decoration-style:initial;text-decoration-color:initial;overflow:auto;word-spacing:0px"><code><span \
style="font-family:Consolas;border:1pt none windowtext;padding:0cm">CREATE KEYSPACE \
"Excalibur"<u></u><u></u></span></code></pre> <pre \
style="vertical-align:baseline"><code><span style="font-family:Consolas;border:1pt \
none windowtext;padding:0cm"> WITH REPLICATION = {'class' : \
'NetworkTopologyStrategy', 'dc1' : \
3};<u></u><u></u></span></code></pre> <p \
style="margin-top:0cm;background:white;vertical-align:baseline;font-variant-ligatures: \
normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:i \
nherit;font-stretch:inherit;line-height:inherit;box-sizing:inherit;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)">and \
when I have another datacenter say </span><code><span \
style="font-size:10pt;font-family:Consolas;color:rgb(36,39,41);border:1pt none \
windowtext;padding:0cm">dc2</span></code><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)">, could I \
edit the </span><code><span \
style="font-size:10pt;font-family:Consolas;color:rgb(36,39,41);border:1pt none \
windowtext;padding:0cm">Excalibur</span></code><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)"> \
keyspace?<u></u><u></u></span></p> <pre \
style="vertical-align:baseline;font-variant-ligatures:normal;font-variant-caps:normal; \
font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;box- \
sizing:inherit;max-height:600px;border-radius:5px;text-decoration-style:initial;text-decoration-color:initial;overflow:auto;word-spacing:0px"><code><span \
style="font-family:Consolas;border:1pt none windowtext;padding:0cm">ALTER KEYSPACE \
"Excalibur"<u></u><u></u></span></code></pre> <pre \
style="vertical-align:baseline"><code><span style="font-family:Consolas;border:1pt \
none windowtext;padding:0cm"> WITH REPLICATION = {'class' : \
'NetworkTopologyStrategy', 'dc2' : \
2};<u></u><u></u></span></code></pre> <p \
style="margin:0cm;background:white;vertical-align:baseline;font-variant-ligatures:norm \
al;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:inher \
it;font-stretch:inherit;line-height:inherit;box-sizing:inherit;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)"><u></u> \
<u></u></span></p> <p \
style="margin:0cm;background:white;vertical-align:baseline"><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)">or can I \
start with </span><code><span \
style="font-size:10pt;font-family:Consolas;color:rgb(36,39,41);border:1pt none \
windowtext;padding:0cm">SimpleStrategy</span></code><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)"> now and \
change to </span><code><span \
style="font-size:10pt;font-family:Consolas;color:rgb(36,39,41);border:1pt none \
windowtext;padding:0cm">NetworkTopologyStrategy</span></code><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41)"> later? I \
suspect this might not work as I think this needs changing snitch \
etc.<u></u><u></u></span></p> </div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Sent from <a \
href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank"> Mail</a> for \
Windows 10</p> <p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</blockquote></div>
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic