You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Guillaume Belrose <ka...@gmail.com> on 2016/01/29 20:50:32 UTC

Gatling tests.

Hi all, 

I have used Gatling (http://gatling.io) in the past to stress test CouchDB servers (BigCouch in particular). Basically, Gatling let’s you write simulations where synthetic users stress test HTTP endpoints. 
I have written some basic simulation for CouchDB (create a database, write x docs, delete the database). Gatling produces nice performance reports (throughput, latency) and is also easy to integrate with Jenkins. 
I am quite happy to share what I have, it is a self contained Maven project so all it requires is a JVM and Maven installed; it downloads all the other dependencies from the Internet. 
If people are interested, I will put something up on Github. 

Guillaume.


Re: Gatling tests.

Posted by Guillaume Belrose <ka...@gmail.com>.
Hi Oleg, 

I think CouchDB 2.0 uses HTTP Basic authentication. You can simply modify your Scala simulation file to include the credentials that you want to pass. 

For example, in my CouchDBSimulation.scala file, I will append the credentials to the http protocol like so:

 val httpConf = http.baseURL(System.getProperty(s"$prefix.serverUrl", "http://127.0.0.1:5984")).basicAuth("foo","bar")

I’ve tested this with CouchDB 1.6 ( but not with 2.0 but it should work the same way).

Out of the box, Gatling also supports Digest authentication (see http://gatling.io/docs/2.0.0-RC2/http/http_protocol.html <http://gatling.io/docs/2.0.0-RC2/http/http_protocol.html>)

Guillaume.




> On 19 May 2016, at 19:30, Oleg Cohen <ol...@gmail.com> wrote:
> 
> Hi Guillaume,
> 
> Very nice package! We are trying to run it against a 2.0 DB, but since we have our DB username/pwd protected the test is failing with first 401 and then 404 errors. Is there a way to add DB credentials?
> 
> Thank you!
> Oleg
> 
>> On Jan 29, 2016, at 2:50 PM, Guillaume Belrose <ka...@gmail.com> wrote:
>> 
>> Guillaume
> 


Re: Gatling tests.

Posted by Oleg Cohen <ol...@gmail.com>.
Hi Guillaume,

Very nice package! We are trying to run it against a 2.0 DB, but since we have our DB username/pwd protected the test is failing with first 401 and then 404 errors. Is there a way to add DB credentials?

Thank you!
Oleg

> On Jan 29, 2016, at 2:50 PM, Guillaume Belrose <ka...@gmail.com> wrote:
> 
> Guillaume


Re: Gatling tests.

Posted by Guillaume Belrose <ka...@gmail.com>.
Hi, 
Here is quick post: http://kafecho.blogspot.co.za/2016/01/how-to-stress-test-couchdb-with-gatling.html
The code on github: https://github.com/kafecho/gatling-couchdb-simulations
Thanks for the feedback :-)
Guillaume.


On 1 February 2016 at 02:36:35, Dave Cottlehuber (dch@skunkwerks.at) wrote:

On Fri, 29 Jan 2016, at 08:50 PM, Guillaume Belrose wrote:  
> Hi all,   
>  
> I have used Gatling (http://gatling.io) in the past to stress test  
> CouchDB servers (BigCouch in particular). Basically, Gatling let’s you  
> write simulations where synthetic users stress test HTTP endpoints.   
> I have written some basic simulation for CouchDB (create a database,  
> write x docs, delete the database). Gatling produces nice performance  
> reports (throughput, latency) and is also easy to integrate with Jenkins.   
> I am quite happy to share what I have, it is a self contained Maven  
> project so all it requires is a JVM and Maven installed; it downloads all  
> the other dependencies from the Internet.   
> If people are interested, I will put something up on Github.   
>  
> Guillaume.  

Sounds great Guillaume!  

Please cc dev@ when you release it, because this is awesome :-)  

If you felt up to a blog post we'd surely mention it in the weekly NEWS.  

A+  
Dave  

Re: Gatling tests.

Posted by Dave Cottlehuber <dc...@skunkwerks.at>.
On Fri, 29 Jan 2016, at 08:50 PM, Guillaume Belrose wrote:
> Hi all, 
> 
> I have used Gatling (http://gatling.io) in the past to stress test
> CouchDB servers (BigCouch in particular). Basically, Gatling let’s you
> write simulations where synthetic users stress test HTTP endpoints. 
> I have written some basic simulation for CouchDB (create a database,
> write x docs, delete the database). Gatling produces nice performance
> reports (throughput, latency) and is also easy to integrate with Jenkins. 
> I am quite happy to share what I have, it is a self contained Maven
> project so all it requires is a JVM and Maven installed; it downloads all
> the other dependencies from the Internet. 
> If people are interested, I will put something up on Github. 
> 
> Guillaume.

Sounds great Guillaume!

Please cc dev@ when you release it, because this is awesome :-)

If you felt up to a blog post we'd surely mention it in the weekly NEWS.

A+
Dave