Launch the heat seekers! Release the swarm! Charge!
HTTP Battle is a tiny NodeJS script used to test (and compare) some web servers in a simple way.
In this repo you will find the script that is used to launch the tests and a docker-compose.yml
example of how you could play with the runtime params.
We have developed this script to battle test 3 NodeJS and 2 Java and the results were, in a very very simplist local test:
- [Java] SPARK 935 request/sec
- [Node] NET 918 request/sec
- [Java] NIO 910 request/sec
- [Node] HTTP 884 request/sec
- [Node] FASTIFY 873 request/sec
If you want to put a server on the battlefield you should provide 2 endpoints as follows:
/prepare
- to reset the internal request counter-
?reset_time
- if you want to provide a specific timestamp for the prepare to happen
/shoot
- to increment the counter and return only its current value