Basic Gatling load script with feeders

Examples on the usage of feeders in Gatling were a bit hard to find on the internet, so maybe someone will find my example helpful in one way or another. I’m no scala guru by any means, so feel free to improve the examples if you feel like it.

This example will run in basic stand-alone Gatling setup (gatling.sh) or through maven using the gatling-maven-plugin (mvn gatling:execute). We’re gonna construct a scala class in file BasicGatlingScenarioWithFeeders.scala. For this to work with gatling.sh the file should be placed in the standard-location ${GATLING_HOME}/user-files/simulations. For Maven, setup a standard maven project and put the file in src/test/scala. Create the directories bodies and data inĀ src/test/scala.

There is another option to run gatling through sbt, but for now that would only complicate things.

Let’s start by importing some Scala and Gatling stuff.

Continue reading

JBoss 6.2: another look at the HTTP-gateway

After reading Pim Gaemers’ wonderful blog about the Fabric HTTP-gateway, it might be useful to add some extra information on how to get this component to function properly.

The HTTP-gateway is a rather simple component: basically it is a vert.x HTTPServer with a HTTPServerZooKeeperCache that keeps track of available services.The cache gets updated from Zookeeper whenever a service registers or quits.

In stead of using a service directly you can send the HTTP request to the HTTP-gateway, which will redirect the request to the matching service: there is no longer a need to know about the specific address-locations of services anymore. On top of that the HTTP-gateway has some loadbalancing capabilities.

Putting the HTTP-gateway to work is as easy as adding the gateway/http profile to a container, and provide the ZooKeeper quorum.

HoweverContinue reading