camel jetty benchmark testing for requests per sec

2019-07-31 08:20发布

问题:

I am building a high load http service that will consume thousands of messages per second and pass it to a messaging system like activemq.

I currently have a rest service (non-camel, non-jetty) that accepts posts from http clients and returns a plain successful respone and i could load test this using apache ab.

We are also looking at camel-jetty as input endpoint since it has integration components for activemq and be part of an esb if required. Before i start building a camel-jetty to activemq route i want to test the load that camel-jetty can support. What should my jetty only route look like,

I am thinking of the route

from("jetty:http://0.0.0.0:8085/test").transform(constant("a"));

and use apache ab to test. I am concerned if this route provides a real camel-jetty capacity since transform could add overhead. or would it not.

Based on these tests i am planning to build the http-mq with or without camel.

回答1:

the transform API will not add significant overhead...I just ran a test against your basic route...

ab -n 2000 -c 50 http://localhost:8085/test

and got the following...

Concurrency Level:      50
Time taken for tests:   0.459 seconds
Complete requests:      2000
Failed requests:        0
Write errors:           0
Non-2xx responses:      2010
Total transferred:      2916510 bytes
HTML transferred:       2566770 bytes
Requests per second:    4353.85 [#/sec] (mean)
Time per request:       11.484 [ms] (mean)
Time per request:       0.230 [ms] (mean, across all concurrent requests)
Transfer rate:          6200.21 [Kbytes/sec] received