Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Document and demonstrate how applications should connect to Cassandra #232

Closed
wallrj opened this issue Feb 1, 2018 · 0 comments
Closed

Comments

@wallrj
Copy link
Member

wallrj commented Feb 1, 2018

I added a cassandra CQL service which loadbalances connections to the CQL ports of all Cassandra nodes.

But on further investigation, it seems that clients (such as GoCQL) will discover all the C* nodes automatically, given a connection to one of them.
And the loadbalancer IP of the CQL service might even confuse this process, since it's not an IP address advertised by any of the nodes.

Figure out the best practice for connecting to Cassandra and document it and perhaps add an example to the documentation and to the E2E tests.

Get rid of the CQL service if it is found to be unnecessary.

/kind feature

wallrj added a commit to wallrj/navigator that referenced this issue Mar 9, 2018
…o connect.

In no particular order:
* Removed the CQL service.
* Added a headless `nodes` service.
* Renamed the `seedprovider` service to `seeds`.
* Added documentation explaining the two headless services and how to connect a CQL client.
* Refactored the two headless services into a single service control
* Removed the service update code, which was not tested and which added unecessary complication.
* Navigator will now only touch the services if they are missing.
* Updated the E2E tests so that `cql_connect` always attempts to connect to the `nodes` service.
* Removed the ServiceName from the NodePool statefulsets because it no longer made sense with multiple NodePools / StatefulSets. The SS servicename is supposed to match a service dedicated to that statefulset, not a single seedprovider service. We probably should dynamically create a service for each nodepool.
* Removed the, also broken, CASSANDRA_SEEDS configuration which was pointing `seedProviderServiceName` rather than at a service name matching the name of the statefulset.
* In E2E tests Reverted to a better mechanism for simulating node failure. Decommission leaves the node in a decommissioned state causing the C* process to immediately exit.
* Added CONSISTENCY checks to the E2E CQL queries to verify that both C* nodes are reachable and have the test data.

Fixes: jetstack#232
wallrj added a commit to wallrj/navigator that referenced this issue Mar 9, 2018
…o connect.

In no particular order:
* Removed the CQL service.
* Added a headless `nodes` service.
* Renamed the `seedprovider` service to `seeds`.
* Added documentation explaining the two headless services and how to connect a CQL client.
* Refactored the two headless services into a single service control
* Removed the service update code, which was not tested and which added unecessary complication.
* Navigator will now only touch the services if they are missing.
* Updated the E2E tests so that `cql_connect` always attempts to connect to the `nodes` service.
* Removed the ServiceName from the NodePool statefulsets because it no longer made sense with multiple NodePools / StatefulSets. The SS servicename is supposed to match a service dedicated to that statefulset, not a single seedprovider service. We probably should dynamically create a service for each nodepool.
* Removed the, also broken, CASSANDRA_SEEDS configuration which was pointing `seedProviderServiceName` rather than at a service name matching the name of the statefulset.
* In E2E tests Reverted to a better mechanism for simulating node failure. Decommission leaves the node in a decommissioned state causing the C* process to immediately exit.
* Added CONSISTENCY checks to the E2E CQL queries to verify that both C* nodes are reachable and have the test data.

Fixes: jetstack#232
wallrj added a commit to wallrj/navigator that referenced this issue Mar 13, 2018
…o connect.

In no particular order:
* Removed the CQL service.
* Added a headless `nodes` service.
* Renamed the `seedprovider` service to `seeds`.
* Added documentation explaining the two headless services and how to connect a CQL client.
* Refactored the two headless services into a single service control
* Removed the service update code, which was not tested and which added unecessary complication.
* Navigator will now only touch the services if they are missing.
* Updated the E2E tests so that `cql_connect` always attempts to connect to the `nodes` service.
* Removed the ServiceName from the NodePool statefulsets because it no longer made sense with multiple NodePools / StatefulSets. The SS servicename is supposed to match a service dedicated to that statefulset, not a single seedprovider service. We probably should dynamically create a service for each nodepool.
* Removed the, also broken, CASSANDRA_SEEDS configuration which was pointing `seedProviderServiceName` rather than at a service name matching the name of the statefulset.
* In E2E tests Reverted to a better mechanism for simulating node failure. Decommission leaves the node in a decommissioned state causing the C* process to immediately exit.
* Added CONSISTENCY checks to the E2E CQL queries to verify that both C* nodes are reachable and have the test data.

Fixes: jetstack#232
jetstack-ci-bot added a commit that referenced this issue Mar 13, 2018
Automatic merge from submit-queue.

Remove the loadbalanced CQL service and document an alternative way to connect.

In no particular order:

* Removed the CQL service.
* Added a headless `nodes` service.
* Renamed the `seedprovider` service to `seeds`.
* Added documentation explaining the two headless services and how to connect a CQL client.
* Refactored the two headless services into a single service control
* Removed the service update code, which was not tested and which added unecessary complication.
* Navigator will now only touch the services if they are missing.
* Updated the E2E tests so that `cql_connect` always attempts to connect to the `nodes` service.
* Removed the ServiceName from the NodePool statefulsets because it no longer made sense with multiple NodePools / StatefulSets. The SS servicename is supposed to match a service dedicated to that statefulset, not a single seedprovider service. We probably should dynamically create a service for each nodepool.
* Removed the, also broken, CASSANDRA_SEEDS configuration which was pointing `seedProviderServiceName` rather than at a service name matching the name of the statefulset.
* In E2E tests Reverted to a better mechanism for simulating node failure. Decommission leaves the node in a decommissioned state causing the C* process to immediately exit.
* Added CONSISTENCY checks to the E2E CQL queries to verify that both C* nodes are reachable and have the test data.

Fixes: #232

**Release note**:
```release-note
NONE
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants