-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Define ScyllaDB as drop-in replacement for Cassandra #4353
Merged
yurishkuro
merged 5 commits into
jaegertracing:main
from
mkorolyov:define-scylladb-support
Mar 31, 2023
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6116244
Define ScyllaDB as drop-in replacement for Cassandra
mkorolyov 24d9722
Update README.md
mkorolyov b8bc39c
describe how to use scylladb as a storage backend
mkorolyov bfbace7
review fixes
mkorolyov f1c15c0
reworked health check approach and fix review style comments
mkorolyov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## ScyllaDB as a storage backend | ||
Jaeger could be configured to use ScyllaDB as a storage backend. This is an experimental feature and this is not an officially supported backend, meaning that Jaeger team will not proactively address any issues that may arise from incompatibilities between the ScyllaDB and Cassandra databases (the team may still accept PRs). | ||
|
||
### Configuration | ||
|
||
Setup Jaeger server to use Cassandra database and just replace conn string to ScyllaDB cluster. No additional configuration is required. | ||
|
||
### Known issues | ||
|
||
#### Protocol version | ||
|
||
Jaeger server detects Cassandra protocol version automatically. At the date of the demo with specified versions server detects that it connected via protocol version 3 while it is actually 4. This leads to warn log in cassandra-schema container: | ||
``` | ||
WARN: DESCRIBE|DESC was moved to server side in Cassandra 4.0. As a consequence DESRIBE|DESC will not work in cqlsh '6.0.0' connected to Cassandra '3.0.8', the version that you are connected to. DESCRIBE does not exist server side prior Cassandra 4.0. | ||
Cassandra version detected: 3 | ||
``` | ||
|
||
Otherwise, it should be fully compatible. | ||
|
||
### Demo | ||
|
||
Docker compose file consists of Jaeger server, Jaeger Cassandra schema writer, Jaeger UI, Jaeger Demo App `HotRod` and a ScyllaDB cluster. | ||
|
||
There is a known issue with docker compose network configuration and containers connectivity on Apple silicone. Sometimes it's helpful to manually create the docker network before running `docker compose up`: | ||
```shell | ||
docker network create --driver bridge jaeger-scylladb | ||
``` | ||
|
||
#### Spin up all infrastructure: | ||
|
||
```shell | ||
docker compose up -d | ||
mkorolyov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
Will: | ||
1. Create ScyllaDB cluster with 3 nodes(about 1 min to initialize) | ||
2. Generate the schema for jaeger key space | ||
3. Start Jaeger server, Jaeger UI and Jaeger Demo App `HotRod` | ||
|
||
#### Run demo app | ||
|
||
1. Wait till all containers are up and running | ||
2. Open Demo app in your browser: http://localhost:8080 and click some buttons. | ||
3. Open Jaeger UI in your browser: http://localhost:16686 and check traces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
networks: | ||
jaeger-scylladb: | ||
external: true | ||
driver: bridge | ||
|
||
services: | ||
collector: | ||
restart: unless-stopped | ||
image: jaegertracing/jaeger-collector:1.43 | ||
environment: | ||
SPAN_STORAGE_TYPE: cassandra | ||
CASSANDRA_SERVERS: scylladb | ||
CASSANDRA_KEYSPACE: jaeger_v1_test | ||
networks: | ||
- jaeger-scylladb | ||
depends_on: | ||
- cassandra-schema | ||
|
||
web: | ||
image: jaegertracing/jaeger-query:1.43 | ||
restart: unless-stopped | ||
mkorolyov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ports: | ||
- 16686:16686 | ||
- 16687:16687 | ||
environment: | ||
SPAN_STORAGE_TYPE: cassandra | ||
CASSANDRA_SERVERS: scylladb | ||
CASSANDRA_KEYSPACE: jaeger_v1_test | ||
networks: | ||
- jaeger-scylladb | ||
depends_on: | ||
- cassandra-schema | ||
|
||
cassandra-schema: | ||
image: jaegertracing/jaeger-cassandra-schema:1.43 | ||
environment: | ||
CASSANDRA_PROTOCOL_VERSION: 4 | ||
CASSANDRA_VERSION: 4 | ||
CQLSH_HOST: scylladb | ||
DATACENTER: test | ||
MODE: test | ||
networks: | ||
- jaeger-scylladb | ||
depends_on: | ||
scylladb: | ||
condition: service_healthy | ||
|
||
scylladb: | ||
restart: always | ||
image: scylladb/scylla:5.1.7 | ||
ports: | ||
- 9042:9042 | ||
volumes: | ||
- .docker/scylladb/1:/var/lib/scylla | ||
networks: | ||
- jaeger-scylladb | ||
healthcheck: | ||
test: ["CMD", "cqlsh", "-e", "describe keyspaces"] | ||
interval: 1s | ||
retries: 120 | ||
timeout: 1s | ||
|
||
scylladb2: | ||
restart: always | ||
image: scylladb/scylla:5.1.7 | ||
command: --seeds=scylladb | ||
volumes: | ||
- .docker/scylladb/2:/var/lib/scylla | ||
networks: | ||
- jaeger-scylladb | ||
|
||
scylladb3: | ||
restart: always | ||
image: scylladb/scylla:5.1.7 | ||
command: --seeds=scylladb | ||
volumes: | ||
- .docker/scylladb/3:/var/lib/scylla | ||
networks: | ||
- jaeger-scylladb | ||
|
||
hotrod: | ||
image: jaegertracing/example-hotrod:latest | ||
ports: | ||
- 8080:8080 | ||
command: [ "all" ] | ||
environment: | ||
- OTEL_EXPORTER_JAEGER_ENDPOINT=http://collector:14268/api/traces | ||
networks: | ||
- jaeger-scylladb | ||
depends_on: | ||
- collector |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like maybe there should be a config param in Jaeger to set the version explicitly instead of sniffing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have tried both
but nothing helped. It depects the version from interaction with ScyllaDB