Tuesday, August 25, 2015

Vertxio Two: JMeter first blush

In Vertxio One we created our first Vertxio microservice.
Now lets "kick the tires".  We are going to have your microservice serve up a 2 MB file per request.
We will use JMeter as the client and see *roughly* what the microservice can do.

Update Microservice:
package vertxio.demo;
import io.vertx.core.AbstractVerticle;
public class MyDemo extends AbstractVerticle{
public void start(){
vertx.createHttpServer()
.requestHandler( req -> {
String file = "C:/temp/dummy.txt";
req.response()
.putHeader("content-type", "text/plain")
.sendFile(file)
.setStatusCode(200)
.setStatusMessage("Sent: "+file);
}).listen(8080);
}
}
view raw MyDemo.java hosted with ❤ by GitHub

Computer: Lenovo Laptop.  Windows 7 64-bit. i5-3320M with 8GB ram.
JMETER Parameters:
300 users with a 600 second ramp up time.

JMETER results: (take results with a grain of sand knowing that I ran it in GUI &
 graphing mode and didn't turn off other apps.  This is just a ballpark to see what it initially yeilds.)
  1. You can see that the throughput is 9,278 requests/minute. :)
  2. The standard deviation is a touch higher than I would like.  But again, this is first blush.

No comments:

Post a Comment