From 086dd971a4c6e5515fe95d5f7b3190381b9174ed Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Thu, 23 Nov 2023 19:09:09 +0100 Subject: [PATCH] Adding node replicas to perform insert operations to the database --- docker/docker-compose-manual-binaries.yml | 32 +++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose-manual-binaries.yml b/docker/docker-compose-manual-binaries.yml index 8291815..1b475c5 100644 --- a/docker/docker-compose-manual-binaries.yml +++ b/docker/docker-compose-manual-binaries.yml @@ -86,6 +86,7 @@ services: nwaku-postgres: ## Waku node with Store mounted & Postgres + ## It can be analyzed the metrics of this particular node image: ubuntu restart: on-failure ports: @@ -111,8 +112,35 @@ services: networks: - simulation + nwaku-postgres-additional: + ## Waku node with Store mounted & Postgres + ## This is aimed to produce more more insert operation to the same Potsgres database. + image: ubuntu + restart: on-failure + <<: + - *logging + - *pg_env + volumes: + # This is expected to be run from metal-01.he-eu-hel1.wakudev.misc.statusim.net + - /home/shared/nwaku/build/wakunode2:/usr/bin/wakunode:Z + - ./run_nwaku_store_postgres_ubuntu.sh:/opt/run_nwaku_store_postgres_ubuntu.sh:Z + entrypoint: bash + command: + - /opt/run_nwaku_store_postgres_ubuntu.sh + depends_on: + - postgres + deploy: + mode: replicated + replicas: 10 + resources: + limits: + cpus: '1' + memory: 2048M + networks: + - simulation + db-postgres-hammer: - ## This service is aimed to mimick other nodes interacting with the same database + ## This service is aimed to stress the database by performing simple select queries image: alpine:3.16 restart: on-failure volumes: @@ -120,7 +148,7 @@ services: entrypoint: sh deploy: mode: replicated - replicas: 1 + replicas: 10 command: - /opt/run_database_hammer.sh depends_on: