The replication factor in Cassandra when creating a keyspace
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
When creating a new namespace in Cassandra, we need to give a number for a replication factor.
Ex:
Does the number, that we are giving as the replication factor, determine the number of nodes that initially create to store the replicate data?
Can anybody give a clear clarification about what that replication factor does?
cassandra namespaces replication-factor
add a comment |
When creating a new namespace in Cassandra, we need to give a number for a replication factor.
Ex:
Does the number, that we are giving as the replication factor, determine the number of nodes that initially create to store the replicate data?
Can anybody give a clear clarification about what that replication factor does?
cassandra namespaces replication-factor
add a comment |
When creating a new namespace in Cassandra, we need to give a number for a replication factor.
Ex:
Does the number, that we are giving as the replication factor, determine the number of nodes that initially create to store the replicate data?
Can anybody give a clear clarification about what that replication factor does?
cassandra namespaces replication-factor
When creating a new namespace in Cassandra, we need to give a number for a replication factor.
Ex:
Does the number, that we are giving as the replication factor, determine the number of nodes that initially create to store the replicate data?
Can anybody give a clear clarification about what that replication factor does?
cassandra namespaces replication-factor
cassandra namespaces replication-factor
edited Nov 25 '18 at 7:21
Mis94
1,24211026
1,24211026
asked Nov 17 '18 at 1:13
Sarah117Sarah117
236
236
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It will not create the number of nodes specified. It just means the number of copies of data. For instance if your cluster is having 5 nodes, your write will be replicated(written) to 3 different nodes depending on the token range it falls. Coming to SimpleStrategy its asn implementation where it does not consider rack or dc's into consideration when replicating.
Thank you. DO you know how to give the number of nodes that I need to create?
– Sarah117
Nov 17 '18 at 7:25
1
The number of nodes (i.e., actual machines) you need to have depends on many factors such as how much data you have (e.g., you may need 100 nodes just to contain enough disks for all the data), and the request load (e.g., if one node can only do 10,000 requests per second and you get 1 million per second, you need 100 nodes). But if you have 100 nodes, it doesn't mean that each piece of data needs to be replicated 100 times! This is where RF (replication factor) comes in. If RF=3, each piece of data is replicated on just 3 of these 100 nodes.
– Nadav Har'El
Nov 18 '18 at 13:15
add a comment |
The explanation @Praneeth Gudumasu given for replication_factor
is true. The number of nodes in a Cassandra cluster is not something you "give", you can actually connect as many number of nodes as you wish: https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddNodeToCluster.html
and each time you connect a new node it is assigned a token range as per Cassandra's architecture. If you don't know how many nodes you need for your application I suggest running a performance test with data size approaching the size you would be inserting in your real application, then try to execute some queries (concurrently) and see with how many nodes you would get a reasonable response time for your queries.
Thank you. Could you please tell me a good tool with the documentation to do a performance test?
– Sarah117
Nov 19 '18 at 4:19
1
You can use a tool like cassandra-stress tool: docs.datastax.com/en/cassandra/3.0/cassandra/tools/… or you can use Docker to start a Cassandra cluster, it is preferred to start each docker container on a separate machine for a more realistic performance test. Then you need to write code in your preferred languange with a client able to connect to the cluster you have set up in order to insert and perform queries on your cluster, for me I used datastax driver in java it supports performing queries either synchronously or asynchronously (asynchronously is more realistic)
– Mis94
Nov 20 '18 at 1:20
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53347300%2fthe-replication-factor-in-cassandra-when-creating-a-keyspace%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It will not create the number of nodes specified. It just means the number of copies of data. For instance if your cluster is having 5 nodes, your write will be replicated(written) to 3 different nodes depending on the token range it falls. Coming to SimpleStrategy its asn implementation where it does not consider rack or dc's into consideration when replicating.
Thank you. DO you know how to give the number of nodes that I need to create?
– Sarah117
Nov 17 '18 at 7:25
1
The number of nodes (i.e., actual machines) you need to have depends on many factors such as how much data you have (e.g., you may need 100 nodes just to contain enough disks for all the data), and the request load (e.g., if one node can only do 10,000 requests per second and you get 1 million per second, you need 100 nodes). But if you have 100 nodes, it doesn't mean that each piece of data needs to be replicated 100 times! This is where RF (replication factor) comes in. If RF=3, each piece of data is replicated on just 3 of these 100 nodes.
– Nadav Har'El
Nov 18 '18 at 13:15
add a comment |
It will not create the number of nodes specified. It just means the number of copies of data. For instance if your cluster is having 5 nodes, your write will be replicated(written) to 3 different nodes depending on the token range it falls. Coming to SimpleStrategy its asn implementation where it does not consider rack or dc's into consideration when replicating.
Thank you. DO you know how to give the number of nodes that I need to create?
– Sarah117
Nov 17 '18 at 7:25
1
The number of nodes (i.e., actual machines) you need to have depends on many factors such as how much data you have (e.g., you may need 100 nodes just to contain enough disks for all the data), and the request load (e.g., if one node can only do 10,000 requests per second and you get 1 million per second, you need 100 nodes). But if you have 100 nodes, it doesn't mean that each piece of data needs to be replicated 100 times! This is where RF (replication factor) comes in. If RF=3, each piece of data is replicated on just 3 of these 100 nodes.
– Nadav Har'El
Nov 18 '18 at 13:15
add a comment |
It will not create the number of nodes specified. It just means the number of copies of data. For instance if your cluster is having 5 nodes, your write will be replicated(written) to 3 different nodes depending on the token range it falls. Coming to SimpleStrategy its asn implementation where it does not consider rack or dc's into consideration when replicating.
It will not create the number of nodes specified. It just means the number of copies of data. For instance if your cluster is having 5 nodes, your write will be replicated(written) to 3 different nodes depending on the token range it falls. Coming to SimpleStrategy its asn implementation where it does not consider rack or dc's into consideration when replicating.
answered Nov 17 '18 at 6:40
Praneeth GudumasuPraneeth Gudumasu
1415
1415
Thank you. DO you know how to give the number of nodes that I need to create?
– Sarah117
Nov 17 '18 at 7:25
1
The number of nodes (i.e., actual machines) you need to have depends on many factors such as how much data you have (e.g., you may need 100 nodes just to contain enough disks for all the data), and the request load (e.g., if one node can only do 10,000 requests per second and you get 1 million per second, you need 100 nodes). But if you have 100 nodes, it doesn't mean that each piece of data needs to be replicated 100 times! This is where RF (replication factor) comes in. If RF=3, each piece of data is replicated on just 3 of these 100 nodes.
– Nadav Har'El
Nov 18 '18 at 13:15
add a comment |
Thank you. DO you know how to give the number of nodes that I need to create?
– Sarah117
Nov 17 '18 at 7:25
1
The number of nodes (i.e., actual machines) you need to have depends on many factors such as how much data you have (e.g., you may need 100 nodes just to contain enough disks for all the data), and the request load (e.g., if one node can only do 10,000 requests per second and you get 1 million per second, you need 100 nodes). But if you have 100 nodes, it doesn't mean that each piece of data needs to be replicated 100 times! This is where RF (replication factor) comes in. If RF=3, each piece of data is replicated on just 3 of these 100 nodes.
– Nadav Har'El
Nov 18 '18 at 13:15
Thank you. DO you know how to give the number of nodes that I need to create?
– Sarah117
Nov 17 '18 at 7:25
Thank you. DO you know how to give the number of nodes that I need to create?
– Sarah117
Nov 17 '18 at 7:25
1
1
The number of nodes (i.e., actual machines) you need to have depends on many factors such as how much data you have (e.g., you may need 100 nodes just to contain enough disks for all the data), and the request load (e.g., if one node can only do 10,000 requests per second and you get 1 million per second, you need 100 nodes). But if you have 100 nodes, it doesn't mean that each piece of data needs to be replicated 100 times! This is where RF (replication factor) comes in. If RF=3, each piece of data is replicated on just 3 of these 100 nodes.
– Nadav Har'El
Nov 18 '18 at 13:15
The number of nodes (i.e., actual machines) you need to have depends on many factors such as how much data you have (e.g., you may need 100 nodes just to contain enough disks for all the data), and the request load (e.g., if one node can only do 10,000 requests per second and you get 1 million per second, you need 100 nodes). But if you have 100 nodes, it doesn't mean that each piece of data needs to be replicated 100 times! This is where RF (replication factor) comes in. If RF=3, each piece of data is replicated on just 3 of these 100 nodes.
– Nadav Har'El
Nov 18 '18 at 13:15
add a comment |
The explanation @Praneeth Gudumasu given for replication_factor
is true. The number of nodes in a Cassandra cluster is not something you "give", you can actually connect as many number of nodes as you wish: https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddNodeToCluster.html
and each time you connect a new node it is assigned a token range as per Cassandra's architecture. If you don't know how many nodes you need for your application I suggest running a performance test with data size approaching the size you would be inserting in your real application, then try to execute some queries (concurrently) and see with how many nodes you would get a reasonable response time for your queries.
Thank you. Could you please tell me a good tool with the documentation to do a performance test?
– Sarah117
Nov 19 '18 at 4:19
1
You can use a tool like cassandra-stress tool: docs.datastax.com/en/cassandra/3.0/cassandra/tools/… or you can use Docker to start a Cassandra cluster, it is preferred to start each docker container on a separate machine for a more realistic performance test. Then you need to write code in your preferred languange with a client able to connect to the cluster you have set up in order to insert and perform queries on your cluster, for me I used datastax driver in java it supports performing queries either synchronously or asynchronously (asynchronously is more realistic)
– Mis94
Nov 20 '18 at 1:20
add a comment |
The explanation @Praneeth Gudumasu given for replication_factor
is true. The number of nodes in a Cassandra cluster is not something you "give", you can actually connect as many number of nodes as you wish: https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddNodeToCluster.html
and each time you connect a new node it is assigned a token range as per Cassandra's architecture. If you don't know how many nodes you need for your application I suggest running a performance test with data size approaching the size you would be inserting in your real application, then try to execute some queries (concurrently) and see with how many nodes you would get a reasonable response time for your queries.
Thank you. Could you please tell me a good tool with the documentation to do a performance test?
– Sarah117
Nov 19 '18 at 4:19
1
You can use a tool like cassandra-stress tool: docs.datastax.com/en/cassandra/3.0/cassandra/tools/… or you can use Docker to start a Cassandra cluster, it is preferred to start each docker container on a separate machine for a more realistic performance test. Then you need to write code in your preferred languange with a client able to connect to the cluster you have set up in order to insert and perform queries on your cluster, for me I used datastax driver in java it supports performing queries either synchronously or asynchronously (asynchronously is more realistic)
– Mis94
Nov 20 '18 at 1:20
add a comment |
The explanation @Praneeth Gudumasu given for replication_factor
is true. The number of nodes in a Cassandra cluster is not something you "give", you can actually connect as many number of nodes as you wish: https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddNodeToCluster.html
and each time you connect a new node it is assigned a token range as per Cassandra's architecture. If you don't know how many nodes you need for your application I suggest running a performance test with data size approaching the size you would be inserting in your real application, then try to execute some queries (concurrently) and see with how many nodes you would get a reasonable response time for your queries.
The explanation @Praneeth Gudumasu given for replication_factor
is true. The number of nodes in a Cassandra cluster is not something you "give", you can actually connect as many number of nodes as you wish: https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddNodeToCluster.html
and each time you connect a new node it is assigned a token range as per Cassandra's architecture. If you don't know how many nodes you need for your application I suggest running a performance test with data size approaching the size you would be inserting in your real application, then try to execute some queries (concurrently) and see with how many nodes you would get a reasonable response time for your queries.
answered Nov 18 '18 at 1:43
Mis94Mis94
1,24211026
1,24211026
Thank you. Could you please tell me a good tool with the documentation to do a performance test?
– Sarah117
Nov 19 '18 at 4:19
1
You can use a tool like cassandra-stress tool: docs.datastax.com/en/cassandra/3.0/cassandra/tools/… or you can use Docker to start a Cassandra cluster, it is preferred to start each docker container on a separate machine for a more realistic performance test. Then you need to write code in your preferred languange with a client able to connect to the cluster you have set up in order to insert and perform queries on your cluster, for me I used datastax driver in java it supports performing queries either synchronously or asynchronously (asynchronously is more realistic)
– Mis94
Nov 20 '18 at 1:20
add a comment |
Thank you. Could you please tell me a good tool with the documentation to do a performance test?
– Sarah117
Nov 19 '18 at 4:19
1
You can use a tool like cassandra-stress tool: docs.datastax.com/en/cassandra/3.0/cassandra/tools/… or you can use Docker to start a Cassandra cluster, it is preferred to start each docker container on a separate machine for a more realistic performance test. Then you need to write code in your preferred languange with a client able to connect to the cluster you have set up in order to insert and perform queries on your cluster, for me I used datastax driver in java it supports performing queries either synchronously or asynchronously (asynchronously is more realistic)
– Mis94
Nov 20 '18 at 1:20
Thank you. Could you please tell me a good tool with the documentation to do a performance test?
– Sarah117
Nov 19 '18 at 4:19
Thank you. Could you please tell me a good tool with the documentation to do a performance test?
– Sarah117
Nov 19 '18 at 4:19
1
1
You can use a tool like cassandra-stress tool: docs.datastax.com/en/cassandra/3.0/cassandra/tools/… or you can use Docker to start a Cassandra cluster, it is preferred to start each docker container on a separate machine for a more realistic performance test. Then you need to write code in your preferred languange with a client able to connect to the cluster you have set up in order to insert and perform queries on your cluster, for me I used datastax driver in java it supports performing queries either synchronously or asynchronously (asynchronously is more realistic)
– Mis94
Nov 20 '18 at 1:20
You can use a tool like cassandra-stress tool: docs.datastax.com/en/cassandra/3.0/cassandra/tools/… or you can use Docker to start a Cassandra cluster, it is preferred to start each docker container on a separate machine for a more realistic performance test. Then you need to write code in your preferred languange with a client able to connect to the cluster you have set up in order to insert and perform queries on your cluster, for me I used datastax driver in java it supports performing queries either synchronously or asynchronously (asynchronously is more realistic)
– Mis94
Nov 20 '18 at 1:20
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53347300%2fthe-replication-factor-in-cassandra-when-creating-a-keyspace%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown