Created
October 15, 2021 21:12
-
-
Save bocharovf/a151e2bfc657804c966fa9763c7ded8b to your computer and use it in GitHub Desktop.
Compare Clickhouse and Elasticsearch for Jaeger
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
address: tcp://clickhouse:9000 |
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
version: "3" | |
services: | |
# STORAGE | |
clickhouse: | |
image: yandex/clickhouse-server:21 | |
networks: | |
- cnet | |
ports: | |
- "8123:8123" | |
- "9000:9000" | |
- "9009:9009" | |
ulimits: | |
nproc: 65535 | |
nofile: | |
soft: 262144 | |
hard: 262144 | |
volumes: | |
- clickdata:/var/lib/clickhouse | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.2 | |
networks: | |
- cnet | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
restart: on-failure | |
environment: | |
ES_JAVA_OPTS: "-Xms512m -Xmx512m" | |
discovery.type: "single-node" | |
volumes: | |
- esdata2:/usr/share/elasticsearch/data | |
# Using Apache Kafka as a temporary storage and stream processing system (span post processing) | |
kafka: | |
image: confluentinc/cp-kafka:5.2.1 | |
networks: | |
- cnet | |
ports: | |
- "9092:9092" | |
environment: | |
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" | |
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092" | |
KAFKA_ADVERTISED_HOST_NAME: "kafka" | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT" | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
KAFKA_BROKER_ID: 1 | |
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | |
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
restart: on-failure | |
# | |
# SERVICES | |
# | |
# Using Apache Zookeeper to coordenate Apache services | |
zookeeper: | |
image: confluentinc/cp-zookeeper:5.2.1 | |
networks: | |
- cnet | |
ports: | |
- "2181:2181" | |
environment: | |
ZOOKEEPER_CLIENT_PORT: "2181" | |
# Using Jaeger Collector to receive spans from Jaeger Agents and send them to Kafka | |
jaeger-collector: | |
image: jaegertracing/jaeger-collector:1.27 | |
hostname: jaeger-collector | |
ports: | |
- "14269:14269" | |
- "14268:14268" | |
- "14267:14267" | |
- "9411:9411" | |
networks: | |
- cnet | |
restart: on-failure | |
environment: | |
LOG_LEVEL: "info" | |
SPAN_STORAGE_TYPE: "kafka" | |
KAFKA_PRODUCER_BROKERS: "kafka:9092" | |
KAFKA_PRODUCER_ENCODING: "json" | |
# Using Jaeger Ingester to receive spans from Kafka and send them to ElasticSearch | |
jaeger-ingester-click: | |
image: jaegertracing/jaeger-ingester:1.27 | |
networks: | |
- cnet | |
ports: | |
- "14270:14270" | |
- "14271:14271" | |
restart: on-failure | |
environment: | |
LOG_LEVEL: "info" | |
INGESTER_PARALLELISM: "1" | |
INGESTER_DEADLOCKINTERVAL: "0ms" | |
SPAN_STORAGE_TYPE: "grpc-plugin" | |
GRPC_STORAGE_PLUGIN_BINARY: "/usr/bin/jaeger-clickhouse-linux-amd64" | |
GRPC_STORAGE_PLUGIN_CONFIGURATION_FILE: "/etc/clickhouse-plugin-config.yaml" | |
KAFKA_CONSUMER_BROKERS: "kafka:9092" | |
KAFKA_CONSUMER_ENCODING: "json" | |
KAFKA_CONSUMER_GROUP_ID: "span-click" | |
depends_on: | |
- kafka | |
volumes: | |
- ./jaeger-clickhouse-linux-amd64:/usr/bin/jaeger-clickhouse-linux-amd64 | |
- ./clickhouse-plugin-config.yaml:/etc/clickhouse-plugin-config.yaml | |
jaeger-ingester-elk: | |
image: jaegertracing/jaeger-ingester:1.27 | |
networks: | |
- cnet | |
ports: | |
- "24270:14270" | |
- "24271:14271" | |
restart: on-failure | |
environment: | |
LOG_LEVEL: "info" | |
INGESTER_PARALLELISM: "1" | |
INGESTER_DEADLOCKINTERVAL: "0ms" | |
SPAN_STORAGE_TYPE: "elasticsearch" | |
ES_SERVER_URLS: "http://elasticsearch:9200" | |
KAFKA_CONSUMER_BROKERS: "kafka:9092" | |
KAFKA_CONSUMER_ENCODING: "json" | |
KAFKA_CONSUMER_GROUP_ID: "span-elk" | |
command: [ | |
"--es.tags-as-fields.all=true" | |
] | |
depends_on: | |
- kafka | |
# Using Jaeger Agent to receive spans from clients locally and send to remote Jaeger Collector | |
jaeger-agent: | |
image: jaegertracing/jaeger-agent:1.27 | |
hostname: jaeger-agent | |
command: ["--reporter.grpc.host-port=jaeger-collector:14250"] | |
ports: | |
- "5775:5775/udp" | |
- "6831:6831/udp" | |
- "6832:6832/udp" | |
- "5778:5778" | |
networks: | |
- cnet | |
restart: on-failure | |
environment: | |
SPAN_STORAGE_TYPE: "elasticsearch" | |
METRICS_BACKEND: "prometheus" | |
depends_on: | |
- jaeger-collector | |
# Using Jaeger Query to work with traces | |
jaeger-query-click: | |
image: jaegertracing/jaeger-query:1.27 | |
environment: | |
no_proxy: "localhost" | |
METRICS_BACKEND: "prometheus" | |
SPAN_STORAGE_TYPE: "grpc-plugin" | |
GRPC_STORAGE_PLUGIN_BINARY: "/usr/bin/jaeger-clickhouse-linux-amd64" # https://github.com/jaegertracing/jaeger-clickhouse | |
GRPC_STORAGE_PLUGIN_CONFIGURATION_FILE: "/etc/clickhouse-plugin-config.yaml" | |
ports: | |
- "16686:16686" | |
- "16687:16687" | |
networks: | |
- cnet | |
restart: on-failure | |
command: [ | |
"--log-level=debug" | |
] | |
depends_on: | |
- jaeger-agent | |
volumes: | |
- ./jaeger-clickhouse-linux-amd64:/usr/bin/jaeger-clickhouse-linux-amd64 | |
- ./clickhouse-plugin-config.yaml:/etc/clickhouse-plugin-config.yaml | |
jaeger-query-elk: | |
image: jaegertracing/jaeger-query:1.27 | |
environment: | |
SPAN_STORAGE_TYPE: "elasticsearch" | |
no_proxy: "localhost" | |
METRICS_BACKEND: "prometheus" | |
ports: | |
- "26686:16686" | |
- "26687:16687" | |
networks: | |
- cnet | |
restart: on-failure | |
command: [ | |
"--es.server-urls=http://elasticsearch:9200", | |
"--span-storage.type=elasticsearch", | |
"--log-level=debug" | |
] | |
depends_on: | |
- jaeger-agent | |
# Using Kafka REST Proxy to have a REST API needed by various UI | |
kafka-rest: | |
image: confluentinc/cp-kafka-rest:5.2.1 | |
hostname: kafka-rest | |
ports: | |
- "8090:8082" | |
environment: | |
KAFKA_REST_ZOOKEEPER_CONNECT: "zookeeper:2181" | |
KAFKA_REST_LISTENERS: "http://0.0.0.0:8090/" | |
KAFKA_REST_HOST_NAME: "kafka-rest" | |
networks: | |
- cnet | |
depends_on: | |
- kafka | |
# Using Kafka Topics UI to monitor Kafka streams | |
kafka-ui: | |
image: landoop/kafka-topics-ui:0.9.4 | |
ports: | |
- "8000:8000" | |
environment: | |
KAFKA_REST_PROXY_URL: "http://kafka-rest:8090/" | |
PROXY: "true" | |
networks: | |
- cnet | |
depends_on: | |
- kafka | |
# Using Jaeger Demo Application to generate sample data | |
demo: | |
image: jaegertracing/example-hotrod:1.27 | |
ports: | |
- "8080:8080" | |
- "8081:8081" | |
- "8082:8082" | |
- "8083:8083" | |
networks: | |
- cnet | |
restart: on-failure | |
environment: | |
JAEGER_AGENT_HOST: "jaeger-agent" | |
JAEGER_AGENT_PORT: 6831 | |
command: [ | |
"all" | |
] | |
depends_on: | |
- jaeger-agent | |
volumes: | |
clickdata: | |
esdata2: | |
networks: | |
cnet: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment