Skip to content

Commit

Permalink
[Java] Use config file for restheart (#6301)
Browse files Browse the repository at this point in the history
* Add RESTHeart

* Update RESTHeart to v5.1.6

* [java] Update RESTHeart to match benchmark conventions

* Performance optimization in services implementation

* Reduce number of io and worker threads

* Update to restheart 5.1.7

* Add environment variables to config.yml to override io-threads and worker-threads configuration parameters

* Update restheart range dependency

* Remove refactored classes

* Add -XX:-RelaxAccessControlCheck java option

* Remove redundant dependency

* Unpdate from origin

* Update configuration to reduce number of working threads. Trivial requests just require few threads

* Cleanup code

* Cleanup conf file

* Increase working threads to 4

* ⬆️ Upgrade to RESTHeart 6

* ⬆️ Upgrade to RESTHeart 7

* ⬆️ Upgrade RESTHeart to v7

* 💚 Remove restheart.yml file from config.yml/binaries

* 🔧 Remove unused configuration option

* 💚 Escape quotes in env var

* 💚 Escape quotes in env var

* 🔧 Set <restheart.version>[7.0,7.1)</restheart.version>

* ⚡ Use dontIntercept to avoid interceptors overhead

* 🔧 Use configuration override file in place of env var

* add config file onto container

---------

Co-authored-by: Andrea Di Cesare <andrea@softinstigate.com>
  • Loading branch information
waghanza and ujibang committed Apr 21, 2023
1 parent 0c66abb commit 9e0069c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
16 changes: 5 additions & 11 deletions java/restheart/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,11 @@ framework:
build:
- mvn package

environment:
RHO: >
/http-listener->{\"enabled\": true, \"host\": \"0.0.0.0\", \"port\": 3000};
/core/name->\"restheart-benchmarker\";
/core/worker-threads->0;
/core/requests-limit->100000;
/fullAuthorizer/enabled->true;
/logging/log-level->\"OFF\";
/ping/enabled->false;
binaries:
- target/benchmark.jar
- etc/conf-overrides.yml

files:
- etc/conf-overrides.yml

command: /usr/bin/java -XX:-RelaxAccessControlCheck -XX:+UseNUMA -XX:+UseParallelGC -jar /opt/web/target/benchmark.jar
command: /usr/bin/java -XX:-RelaxAccessControlCheck -XX:+UseNUMA -XX:+UseParallelGC -jar /opt/web/target/benchmark.jar -o /opt/web/etc/conf-overrides.yml
16 changes: 16 additions & 0 deletions java/restheart/etc/conf-overrides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/http-listener:
enabled: true
host: "0.0.0.0"
port: 3000

/core/name: restheart-benchmarker

/core/worker-threads: 0

/core/requests-limit: 100000

/fullAuthorizer/enabled: true

/logging/log-level: "OFF"

/ping/enabled: false

0 comments on commit 9e0069c

Please sign in to comment.