{"id":21230097,"url":"https://github.com/fgforrest/httpserverevaluationtest","last_synced_at":"2025-07-11T07:06:01.944Z","repository":{"id":77989651,"uuid":"474969539","full_name":"FgForrest/HttpServerEvaluationTest","owner":"FgForrest","description":"This repository contains simple proof of concept work that evaluates different HTTP server implementations, their usability as a HTTP GraphQL/REST/gRPC API server, memory footprint and performance characteristics.","archived":false,"fork":false,"pushed_at":"2024-06-06T07:26:39.000Z","size":156,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-15T02:17:18.239Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FgForrest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-28T11:21:34.000Z","updated_at":"2024-06-06T07:26:42.000Z","dependencies_parsed_at":"2024-06-05T22:05:30.654Z","dependency_job_id":null,"html_url":"https://github.com/FgForrest/HttpServerEvaluationTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FgForrest/HttpServerEvaluationTest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FgForrest%2FHttpServerEvaluationTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FgForrest%2FHttpServerEvaluationTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FgForrest%2FHttpServerEvaluationTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FgForrest%2FHttpServerEvaluationTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FgForrest","download_url":"https://codeload.github.com/FgForrest/HttpServerEvaluationTest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FgForrest%2FHttpServerEvaluationTest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264753000,"owners_count":23658768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T23:35:18.354Z","updated_at":"2025-07-11T07:06:01.925Z","avatar_url":"https://github.com/FgForrest.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HttpServerEvaluationTest\n\nThis repository contains simple proof of concept work that evaluates different HTTP server implementations, \ntheir usability as a HTTP GraphQL/REST/gRPC API server, memory footprint and performance characteristics.\n\nBenchmark consists of simple echo GraphQL API and implementations of individual HTTP servers serving the GraphQL API.\nTested servers are:\n\n- [microhttp](https://github.com/ebarlas/microhttp)\n- [NanoHTTPD](https://github.com/NanoHttpd/nanohttpd)\n- [Netty](https://github.com/netty/netty)\n- [Spring Boot MVC](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#spring-web)\n- [Spring Boot WebFlux](https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html#spring-webflux)\n- [Vert.x](https://github.com/eclipse-vertx/vert.x)\n- [Quarkus Native](https://quarkus.io/)\n- [Quarkus JVM](https://quarkus.io/)\n- [Undertow](https://github.com/undertow-io/undertow)\n- [Micronaut](https://micronaut.io/)\n- [Javalin](https://github.com/tipsy/javalin)\n\n## Run tests\n\nBuild from root using:\n```\nmvn clean install -Dnative\n```\nand separately build Micronaut server:\n```\ncd micronaut_server\nmvn clean package\n```\n\nIf you want native version of Quarkus build with `native` parameter`:\n```\nmvn clean install -Dnative\n```\n\nAfter that run servers separately by following shell scripts:\n\n```\n./run-armeria-server.sh\n./run-javalin-server.sh\n./run-microhttp-server.sh\n./run-micronaut-server.sh\n./run-nanohttpd-server.sh\n./run-netty-server.sh\n./run-quarkus-server.sh\n./run-quarkus-native-server.sh\n./run-spring-boot-mvc-server.sh\n./run-spring-boot-web-flux-server.sh\n./run-undertow-server.sh\n./run-vertx-server.sh\n```\n\nFinally, run JMH benchmarks for each of the server, e.g.:\n\n```\njava -jar performance_tests/target/benchmarks.jar .*Armeria.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Javalin.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*MicroHTTP.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Micronaut.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*NanoHTTPD.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Netty.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Quarkus.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*MVC.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Flux.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Undertow.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*VertX.* -wi 1 -i 5 -f 1 -rf json -rff results.json\n```\n\n## GraphQL API\n\nAPI is simple echo query which returns passed argument.\nRequest:\n```graphql\nquery Echo {\n    echo(message: \"hello\") {\n        message\n    }\n}\n```\nand response:\n```json\n{\n  \"data\": {\n    \"echo\": {\n      \"message\": \"hello\"\n    }\n  }\n}\n```\n\nIt has its own Maven module `graphql` where is simple implementation of GraphQL API for easier implementation of servers.\n\n## HTTP Servers\n\nServers are implemented in separate Maven modules.\nEach server has `server runner` class which is responsible for starting and stopping server and mapping handlers\nto endpoints.\nThere are implementations of `Hello world` endpoint and GraphQL API endpoint to simulate simple routing.\nEach server has assigned specific port on which it will start, starting with `8081`.\n\nEach server is started by specific command:\n\n```\n./run-javalin-server.sh\n./run-microhttp-server.sh\n./run-micronaut-server.sh\n./run-nanohttpd-server.sh\n./run-netty-server.sh\n./run-quarkus-server.sh\n./run-quarkus-native-server.sh\n./run-spring-boot-mvc-server.sh\n./run-spring-boot-web-flux-server.sh\n./run-undertow-server.sh\n./run-vertx-server.sh\n```\n\n## Benchmarks\n\nFor benchmarking there is Maven module `performance_tests`.\nEach server has its own test where HTTP Client calls the API with request mentioned above.\nThe tests are built using JMH framework and measure throughput and latency in maximum possible threads.\nAfter the server is running, benchmarks can be run by:\n\n```\njava -jar performance_tests/target/benchmarks.jar .*Javalin.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*MicroHTTP.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Micronaut.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*NanoHTTPD.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Netty.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Quarkus.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Quarkus.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*MVC.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Flux.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*Undertow.* -wi 1 -i 5 -f 1 -rf json -rff results.json\njava -jar performance_tests/target/benchmarks.jar .*VertX.* -wi 1 -i 5 -f 1 -rf json -rff results.json\n```\n\nwhich runs single warmup iteration and 5 normal iterations and saves the results to JSON file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgforrest%2Fhttpserverevaluationtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgforrest%2Fhttpserverevaluationtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgforrest%2Fhttpserverevaluationtest/lists"}