• Stars
    star
    4
  • Rank 3,304,323 (Top 66 %)
  • Language
    Scala
  • Created over 6 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Weakest Link challenge

Let’s discover the distributed tracing system named Jaeger (https://github.com/jaegertracing/jaeger) through a game inspired from "The Weakest Link" (TV game show).

Interested people can join the game, the only requirement is to have a laptop. During the session, we will try to interconnect our computers to build the longest chain(s) each of us completing a story by only knowing his nearest neighbor part.

Once the chain is up, we’ll send the initial HTTP request (JSON POST), and thanks to the Jaeger User interface every-body will be able to take a look to the global trace and find out who was the current weakest link ! (with high response times or errors)

The sound track : https://www.youtube.com/watch?v=VJnm43i6Rr4


Introduction

This small challenge will also show your various techs & tools in action :


Instructions with binaries

Step 0 - Prerequisites

  • Check you internet access
    • Connect to the provided 4G router
  • Get the the-weakest-link binaries
    • tar xvfz the-weakest-link-0.0.1-SNAPSHOT.tgz
  • Check your java release, a not too old 1.8 jvm is required

Instructions with binaries

Step 1 - Configure

export JAVA_OPTS="
   -Dweakest-link.neighbor=127.0.0.1
   -Dkamon.environment.service=YOUR_CHOSEN_UNIK_SVC_ID
   -Dkamon.jaeger.host=127.0.0.1
   "

Instructions with binaries

Step 2 - Start the app

  • Starts the weakest link application :
    • ./the-weakest-link-0.0.1-SNAPSHOT/bin/the-weakest-link
  • Check if it works fine
    • curl -s http://localhost:8080
      • should return {"status":"OK"}

Instructions

Step 3 - Customize the story

  • Check the connectivity with your neighbor, and get its story part

     curl -s http://localhost:8080/asknext
  • Build your own story part by continuing what your neighbor has written

    • Edit the file myStoryPart.txt
      • automatically generated on service first start
      • prefilled with a message : undefined-MyHostName
    • Of course you will have to wait for your neighbor to have his file updated with his own story part.
  • Check your own story part :

     curl -s http://localhost:8080/ask

Instructions

Step 4 - Who is the weakest Link ?

  • I'll send the first http POST request
  • Let's read the global story :)
  • Browse to Jaeger user interface to answer :
    • Who is the slowest link ?
    • If some error was encountered, who is the guilty link ?

Instructions

Step 5 - Let's monitor everything

  • Give me your IP
    • for me to setup my prometheus instance
  • Browse to Grafana user interface
  • Let's build a dashboard

Notes for the challenge administrators

Start Jaeger

docker run -d \
   --name jaeger \
   -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
   -p 0.0.0.0:5775:5775/udp \
   -p 0.0.0.0:6831:6831/udp \
   -p 0.0.0.0:6832:6832/udp \
   -p 0.0.0.0:5778:5778 \
   -p 0.0.0.0:16686:16686 \
   -p 0.0.0.0:14268:14268 \
   -p 0.0.0.0:9411:9411 \
   jaegertracing/all-in-one:latest

Browse to IP:16686 to reach the Jaeger user interface.


Notes for the challenge administrators

Start Prometheus & grafana

A simple prometheus.yml file for this app is in the git repository root directory. TAKE CARE WITH THE IP INSIDE THIS FILE

docker run -d -p 0.0.0.0:9090:9090 \
   --name kapromotheus \
   -v $PWD/prometheus.yml:/etc/prometheus/prometheus.yml \
   prom/prometheus

docker run -d --name=grafana -p 0.0.0.0:3000:3000 grafana/grafana

Notes for the challenge administrators

Prometheus/grafana queries example

Some prometheus query examples :

rate(akka_http_server_open_connections_sum[5m])
rate(akka_http_server_active_requests_sum[5m])
rate(akka_system_active_actors_sum[5m])

Notes for the challenge administrators

Prometheus/grafana template

Template variable configuration :

Variable Name : InstanceName
Query : label_values(akka_http_server_open_connections_sum, instance)
Include All option : Enabled

Grafana graph configuration with template

A: rate(akka_http_server_open_connections_sum{instance=~"$InstanceName"}[5m])
Legend Format : {{ instance }}

Notes for the challenge administrators

Full chain request

curl -s \
  -H 'content-type: application/json'   \
  -d '{"maxDepth":20}' \
  http://localhost:8080/chain | jq
curl -s \
  -H 'content-type: application/json'   \
  -d '{"maxDepth":20, "failDepth":2}' \
  http://localhost:8080/chain | jq
curl -s \
  -H 'content-type: application/json'   \
  -d '{"maxDepth":5, "slowDepth":2}' \
  http://localhost:8080/chain | jq

More Repositories

1

jassh

High level scala SSH API for easy and fast operations on remote servers.
Scala
71
star
2

code-examples-manager

Software tool to manage your notes, scripts, code examples, configs,... to publish them as gists or snippets
Scala
37
star
3

zio-lmdb

Lightning Memory Database (LMDB) for scala ZIO
Scala
36
star
4

jajmx

scala JMX API
Scala
31
star
5

sotohp

Photos management
Scala
27
star
6

scala-drools-dummy-project

Minimalist scala drools project
Scala
19
star
7

coursier-launcher

coursier docker container for efficient application or service download and startup
Makefile
9
star
8

zwords

A wordle game for communities
Scala
8
star
9

jaseries

scala API for time numerical series operations.
Scala
7
star
10

primes

Playing with primes using scala language. Draw Ulam spiral, ...
Scala
7
star
11

zio-worksheet

Simplified ZIO user experience in REPL, worksheet or script contexts
Scala
6
star
12

bootstrap

scala script bootstrap mechanism with #include support
Scala
6
star
13

custom-collection

Custom scala collection examples
Scala
4
star
14

scala-dummy-project

scala dummy project with standalone executable jar
Shell
3
star
15

drools-scripting

Drools made easy to use for scripting or testing purposes
Scala
2
star
16

codingame-with-scalakit-example

codingame scalakit example using git submodule to reference the scalakit
Scala
2
star
17

simple-plugin-architecture

Scala simple plugin architecture (with plugin automatic compilation if required)
Scala
2
star
18

exproxy

a 2005 personal project...
Java
2
star
19

cntlm

dockerized cntlm
Shell
2
star
20

primes-scalatra-app

Scala
1
star
21

naturalsort

scala naturalsort algorithm
Scala
1
star
22

web-echo

A websocket/webhook JSON data recorder with API
Scala
1
star
23

akka-sandbox

temporary project to test and learn AKKA 2
Scala
1
star
24

advent-of-code-2023

Scala
1
star
25

bullyboy

sha1 brute force attack
Scala
1
star
26

the-rules-for-good-code-examples

Several rules to write the best possible source code examples
1
star
27

data-recorder

Scala
1
star
28

advent-of-code-2020

Scala
1
star
29

jenkins-phantomjs-slave

jenkins slave with phantomjs 1.9 docker image
1
star
30

dock-primesui

Shell
1
star
31

jenkins

Jenkins docker image
Shell
1
star