Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Cassandra keyspace to NetworkTopologyStrategy #350

Closed
subnetmarco opened this issue Jun 22, 2015 · 3 comments
Closed

Migrate Cassandra keyspace to NetworkTopologyStrategy #350

subnetmarco opened this issue Jun 22, 2015 · 3 comments
Assignees
Labels
task/feature Requests for new features in Kong
Milestone

Comments

@subnetmarco
Copy link
Member

We should change the replication strategy of the Kong keyspace to NetworkTopologyStrategy as opposed to having SimpleStrategy to make it easier to scale a Cassandra cluster. From the Cassandra documentation:

NetworkTopologyStrategy: Highly recommended for most deployments because it is much easier to expand to multiple data centers when required by future expansion.

It means that NetworkTopologyStrategy can work pretty much in every scenario (including single-machine, or single-datacenter), while SimpleStrategy is more limited.

Doing this should be as easy as executing:

ALTER KEYSPACE kong WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'DC1' : 1};

This also brings another question: in a production environment I might be wanting to setup my own Cassandra cluster with some very specific settings, how do we prevent Kong migrations from being executed and reverting these settings?

@subnetmarco subnetmarco added this to the 0.4.0 milestone Jun 26, 2015
@subnetmarco
Copy link
Member Author

This seems to work when invoked by cqlsh, but the same command fails when executed from the migration script:

[ERR] Cannot record migration 2015-06-09-170921_0.4.0: Cassandra error: Cassandra returned error (Unavailable exception): "Cannot achieve consistency level ONE"

Very weird since the same command seems to be working manually:

ALTER KEYSPACE kong WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'DC1' : 1};

@subnetmarco subnetmarco modified the milestones: 0.5.0, 0.4.0 Jul 21, 2015
@thibaultcha thibaultcha removed this from the 0.5.0 milestone Aug 27, 2015
@thibaultcha
Copy link
Member

See #543 for what needs to be done here.

thibaultcha added a commit that referenced this issue Sep 30, 2015
Possibility to configure the replication strategy used by the created
keyspace and its options.

Implements #543 and #350
@thibaultcha thibaultcha self-assigned this Sep 30, 2015
thibaultcha added a commit that referenced this issue Oct 5, 2015
Possibility to configure the replication strategy used by the created
keyspace and its options.

Implements #543 and #350
@thibaultcha thibaultcha added the task/feature Requests for new features in Kong label Oct 15, 2015
@thibaultcha thibaultcha added this to the 0.6.0 milestone Oct 15, 2015
thibaultcha added a commit that referenced this issue Oct 15, 2015
Possibility to configure the replication strategy used by the created
keyspace and its options.

Implements #543 and #350
@thibaultcha
Copy link
Member

Implemented with #634.

thibaultcha added a commit that referenced this issue Oct 16, 2015
Possibility to configure the replication strategy used by the created
keyspace and its options.

Implements #543 and #350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task/feature Requests for new features in Kong
Projects
None yet
Development

No branches or pull requests

2 participants