Skip to content

Commit 411fcb9

Browse files
authored
LoadTester utility for benchmarking Membrane's performance … (#2441)
* feat: add LoadTester utility for benchmarking Membrane's performance and update README with test results and scalability details * **feat: enhance LoadTester concurrency support and update dependencies** - Updated `LoadTester` to include granular tracking of minimum semaphore permits during execution. - Configured `AsyncHttpClient` with custom timeouts and connection limits for enhanced control and scalability. - Replaced atomic LongAdder with AtomicInteger for better parallel execution tracking. - Fixed formatting and simplified constants for readability. - Upgraded `async-http-client` dependency from `2.12.3` to `3.0.4`. - Adjusted YAML examples in `README.md` and clarified `JsonSchemaGenerator` flow logic documentation. - Updated `ROADMAP.md` to reflect ongoing development goals. * refactor: minor * refactor: minor * refactor: minor * **feat: add documentation for Distribution Module and update assembly exclusion** - Introduced a `README.md` for the Distribution module with details on responsibilities, usage, and building process. - Updated `distribution.xml` to exclude `org.membrane-soa:membrane-api-gateway` from final ZIP packaging. * chore: clarify ROADMAP note on WebSocketInterceptor.flow renaming * refactor: restructure package structure for Distribution Module - Moved `FilterExamples`, `LoadTester`, and `IDEStarter` classes to new `com.predic8.membrane.build` and `com.predic8.membrane.devtools` packages. - Updated `distribution.xml` to include proper module exclusions. - Adjusted POM dependencies and plugin configurations, ensuring consistency with the new package structure. - Updated README to reflect the changes in package organization. * feat: add IDE starter instructions and logging configuration to Distribution Module - Updated `README.md` with steps for running Membrane in IDE and locating log configuration. - Added Log4j dependencies with `provided` scope to `pom.xml`. - Moved `log4j2.xml` configuration to the correct resources directory. - Simplified log configuration initialization in `IDEStarter`. * chore: remove redundant parent and unused dependencies from distribution pom.xml * refactor: update LoadTester concurrency settings and package structure - Reduced `CONCURRENCY` from 15000 to 200 in `LoadTester`. - Updated package from `com.predic8.membrane.devtools` to `com.predic8.membrane.load`. - Adjusted `pom.xml` dependencies, changing `async-http-client` scope from `provided` to `test`. * refactor: adjust Log4j dependencies across modules - Moved Log4j dependencies to appropriate locations in `annot/pom.xml` and `distribution/pom.xml`. - Organized test dependencies to ensure separation and clarity in `annot` module. - Improved indentation and comments in `distribution/pom.xml` for better readability. * refactor: enhance `annot/pom.xml` formatting and dependency organization - Improved XML indentation for better readability. - Reorganized dependencies, ensuring logical grouping and clarified test dependencies. - Adjusted comments for consistency and clarity. * refactor: set Log4j dependencies to test scope in `annot/pom.xml` for better organization * fix: upgrade jsonassert dependency in `distribution/pom.xml` from 1.5.1 to 1.5.3 * refactor: reorganize dependencies in `core/pom.xml` and enhance logging configuration - Reorganized dependencies in `core/pom.xml` for improved clarity and logical grouping. - Added Log4j2 configuration file `log4j2.xml` in `distribution/conf`. - Adjusted dependency scopes for better separation between provided and test libraries. - Introduced rolling file logging and ANSI color support in the logging setup. * chore: update dependencies in `core/pom.xml` - Upgraded `graal-sdk` to 24.2.0, `mongodb-driver-sync` to 5.6.2, and `activemq-broker` to 5.19.1. * chore: centralize GraalVM version in `core/pom.xml` properties - Added `graalvm.version` property for consistent version management. - Updated `graal-sdk` and `graalvm.js` dependencies to use the centralized property.
1 parent f66a966 commit 411fcb9

12 files changed

Lines changed: 627 additions & 368 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
<img src="docs/images/api-gateway-demo.gif" alt="Animated demo of Membrane API Gateway" width="800">
99

10-
Lightweight **API Gateway** for **REST**, **GraphQL** and **legacy SOAP Web Services**, easily extended with powerful plugins and Java.
10+
Lightweight **API Gateway** for **REST**, **GraphQL** and **legacy Web Services**, easily extended with powerful plugins.
1111

12-
Solve complex API requirements with simple configurations.
12+
Based on the Java platform, Membrane integrates smoothly with major enterprise technologies. Load tests show that Java provides an excellent foundation for high performance and scalability. On a 2021 MacBook Pro, Membrane handles more than 20,000 requests per second, supports up to 10,000 concurrent clients, and can host over 100,000 APIs on a single instance.
1313

14-
The following YAML configuration samples require Membrane version 7.0.0 or newer.
14+
The examples below demonstrate how to address a wide range of API Gateway requirements using simple configurations. Version **7.0.0 or newer** is required.
1515

1616
**Forwarding Requests from Port 2000 to a Backend:**
1717

@@ -580,7 +580,7 @@ When a JavaScript script returns a `Response` object as the last line of code, t
580580
The following example generates a JSON response and sends it directly to the client:
581581
582582
```yaml
583-
spec:
583+
api:
584584
port: 2000
585585
flow:
586586
- javascript:
@@ -731,7 +731,7 @@ api:
731731
...or into XML:
732732
733733
```yaml
734-
spec:
734+
api:
735735
port: 2000
736736
flow:
737737
- request:

annot/pom.xml

Lines changed: 48 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
15-
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
15+
-->
16+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1618

17-
<modelVersion>4.0.0</modelVersion>
18-
<artifactId>service-proxy-annot</artifactId>
19-
<name>${project.artifactId}</name>
20-
<packaging>jar</packaging>
19+
<modelVersion>4.0.0</modelVersion>
20+
<artifactId>service-proxy-annot</artifactId>
21+
<name>${project.artifactId}</name>
22+
<packaging>jar</packaging>
2123

2224
<parent>
2325
<groupId>org.membrane-soa</groupId>
@@ -26,33 +28,15 @@
2628
<version>7.0.5-SNAPSHOT</version>
2729
</parent>
2830

29-
<dependencies>
30-
<dependency>
31-
<groupId>org.springframework</groupId>
32-
<artifactId>spring-beans</artifactId>
33-
</dependency>
34-
<dependency>
35-
<groupId>org.springframework</groupId>
36-
<artifactId>spring-context</artifactId>
37-
</dependency>
38-
<dependency>
39-
<groupId>org.junit.jupiter</groupId>
40-
<artifactId>junit-jupiter-api</artifactId>
41-
<scope>test</scope>
42-
</dependency>
43-
<dependency>
44-
<groupId>org.junit.jupiter</groupId>
45-
<artifactId>junit-jupiter-engine</artifactId>
46-
<scope>test</scope>
47-
</dependency>
48-
<dependency>
49-
<groupId>org.apache.logging.log4j</groupId>
50-
<artifactId>log4j-slf4j2-impl</artifactId>
51-
</dependency>
52-
<dependency>
53-
<groupId>org.apache.logging.log4j</groupId>
54-
<artifactId>log4j-core</artifactId>
55-
</dependency>
31+
<dependencies>
32+
<dependency>
33+
<groupId>org.springframework</groupId>
34+
<artifactId>spring-beans</artifactId>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.springframework</groupId>
38+
<artifactId>spring-context</artifactId>
39+
</dependency>
5640
<dependency>
5741
<groupId>com.fasterxml.jackson.core</groupId>
5842
<artifactId>jackson-databind</artifactId>
@@ -73,6 +57,27 @@
7357
<version>2.0.0</version>
7458
</dependency>
7559

60+
<!-- Test dependencies -->
61+
<dependency>
62+
<groupId>org.apache.logging.log4j</groupId>
63+
<artifactId>log4j-slf4j2-impl</artifactId>
64+
<scope>test</scope>
65+
</dependency>
66+
<dependency>
67+
<groupId>org.apache.logging.log4j</groupId>
68+
<artifactId>log4j-core</artifactId>
69+
<scope>test</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.junit.jupiter</groupId>
73+
<artifactId>junit-jupiter-api</artifactId>
74+
<scope>test</scope>
75+
</dependency>
76+
<dependency>
77+
<groupId>org.junit.jupiter</groupId>
78+
<artifactId>junit-jupiter-engine</artifactId>
79+
<scope>test</scope>
80+
</dependency>
7681
<dependency>
7782
<groupId>org.hamcrest</groupId>
7883
<artifactId>hamcrest</artifactId>
@@ -81,15 +86,15 @@
8186
</dependency>
8287
</dependencies>
8388

84-
<build>
85-
<plugins>
86-
<plugin>
87-
<artifactId>maven-compiler-plugin</artifactId>
88-
<configuration>
89-
<!-- Disable annotation processing for ourselves. -->
90-
<compilerArgument>-proc:none</compilerArgument>
91-
</configuration>
92-
</plugin>
93-
</plugins>
94-
</build>
89+
<build>
90+
<plugins>
91+
<plugin>
92+
<artifactId>maven-compiler-plugin</artifactId>
93+
<configuration>
94+
<!-- Disable annotation processing for ourselves. -->
95+
<compilerArgument>-proc:none</compilerArgument>
96+
</configuration>
97+
</plugin>
98+
</plugins>
99+
</build>
95100
</project>

0 commit comments

Comments
 (0)