#!/bin/sh
docker run --rm --sysctl net.ipv4.ip_unprivileged_port_start=0 -v $(pwd)./haproxy.cfg://usr/local/etc/haproxy/haproxy.cfg:ro haproxy:2.7 -c
i=$(($i+1)); echo -n "Nachricht #$i -- $(date)" | http put :8080/5c73531c-6fc4-426c-adcb-afc5c140a0f7/kai/$i X-Shard:2
+echo "show map" | socat stdio tcp4-connect:127.0.0.1:8401
+echo "show map /usr/local/etc/haproxy/sharding.map" | socat stdio tcp4-connect:127.0.0.1:8401
+echo "set map /usr/local/etc/haproxy/sharding.map 0 backend_3" | socat stdio tcp4-connect:127.0.0.1:8401
image: juplo/chat-backend:0.0.1-SNAPSHOT
environment:
chat.backend.services: kafka
+ chat.backend.instance-id: backend_1
chat.backend.kafka.instance-uri: http://backend-1
chat.backend.kafka.client-id-prefix: 1
chat.backend.kafka.bootstrap-servers: kafka:9092
image: juplo/chat-backend:0.0.1-SNAPSHOT
environment:
chat.backend.services: kafka
+ chat.backend.instance-id: backend_2
chat.backend.kafka.instance-uri: http://backend-2
chat.backend.kafka.client-id-prefix: 2
chat.backend.kafka.bootstrap-servers: kafka:9092
image: juplo/chat-backend:0.0.1-SNAPSHOT
environment:
chat.backend.services: kafka
+ chat.backend.instance-id: backend_3
chat.backend.kafka.instance-uri: http://backend-3
chat.backend.kafka.client-id-prefix: 3
chat.backend.kafka.bootstrap-servers: kafka:9092