-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
describe how to use scylladb as a storage backend
- Loading branch information
Showing
4 changed files
with
143 additions
and
1 deletion.
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,40 @@ | ||
### 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 known issues with docker compose network configuration and containers connectivity on Apple Silicone. That's why before `upping` the docker compose you need to manually create network which later be used by docker compose: | ||
```shell | ||
docker network create --driver bridge jaeger-scylladb | ||
``` | ||
|
||
Create ScyllaDB cluster with 3 nodes and give it some time to start(around 1 minute): | ||
```shell | ||
docker compose up -d scylladb scylladb2 scylladb3 | ||
``` | ||
|
||
Start Jaeger server, Jaeger UI, Jaeger Demo App `HotRod` and Jaeger Cassandra schema writer: | ||
```shell | ||
docker compose up -d | ||
``` | ||
Open Demo app in your browser: http://localhost:8080 and make some clicks | ||
|
||
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,87 @@ | ||
networks: | ||
jaeger-scylladb: | ||
external: true | ||
driver: bridge | ||
|
||
services: | ||
collector: | ||
image: jaegertracing/jaeger-collector:1.43 | ||
environment: | ||
SPAN_STORAGE_TYPE: cassandra | ||
CASSANDRA_SERVERS: scylladb | ||
CASSANDRA_KEYSPACE: jaeger_v1_test | ||
networks: | ||
- jaeger-scylladb | ||
depends_on: | ||
- scylladb | ||
|
||
web: | ||
image: jaegertracing/jaeger-query:1.43 | ||
restart: unless-stopped | ||
ports: | ||
- 16686:16686 | ||
- 16687:16687 | ||
environment: | ||
SPAN_STORAGE_TYPE: cassandra | ||
CASSANDRA_SERVERS: scylladb | ||
CASSANDRA_KEYSPACE: jaeger_v1_test | ||
networks: | ||
- jaeger-scylladb | ||
depends_on: | ||
- scylladb | ||
|
||
cassandra-schema: | ||
image: jaegertracing/jaeger-cassandra-schema:1.43 | ||
environment: | ||
CQLSH_HOST: scylladb | ||
DATACENTER: test | ||
MODE: test | ||
networks: | ||
- jaeger-scylladb | ||
depends_on: | ||
- scylladb | ||
|
||
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", "./scylla-healthcheck.sh"] | ||
interval: 2s | ||
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 |
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,15 @@ | ||
#!/bin/bash | ||
|
||
# Define the expected number of nodes | ||
EXPECTED_NODES=3 | ||
SCYLLADB_CONTAINER_NAME=jaeger-scylladb-1 | ||
|
||
# Get the actual number nodes which status is UN (Up and Normal) | ||
ACTUAL_NODES=$(docker exec -it $(docker ps -a | grep $SCYLLADB_CONTAINER_NAME | cut -d' ' -f1) nodetool status | grep '^UN' | wc -l) | ||
|
||
# Compare the actual number of nodes with the expected number | ||
if test "$ACTUAL_NODES" -ne "$EXPECTED_NODES"; then | ||
exit 1 | ||
fi | ||
|
||
exit 0 |