Been thinking about if it would be possible to write a plugin right into Kong that utilizes the lua-resty-http lib for http load testing on top of a dummy proxy endpoint like /loadtesting where I pass in say a flag that lets the plugin know this request is for it, url / headers / payload / users (# of lua-resty-http clients) or a total tx or timer of sorts as post body or get query parameters and the plugin immediately goes to work. Do we think it would be possible to create multiple instances of that lua-resty-http library running at once within one kong plugin, anyone know how to instantiate the lib to make like 0-100 instances of itself(representing users) and start sending requests in a time / request count driven loop? Seems like we would need to utilize the ngx.thread.spawn call potentially(https://github.com/openresty/lua-nginx-module#ngxthreadspawn ?)
Other features I was thinking about including:
- Email with response times / 95th percentile / status code counts and such.
Do we think this is doable as a plugin or I am better off using Gatling or some other tool externally. Would really be neat to leverage our Kong infra as a load testing tool too (potentially use my Kong dev env cluster to stress test my Kong stage env proxy services). Just would give Kong another use case as a flexible tool around APIs.