I’m trying to get a sense of how ktor server performs under load for a couple different scenarios of ktor client usage in the context of a proxy service. One is whether/how much the client engine has an effect. The other is using a singleton instance of the client throughout the lifetime of the application vs creating and disposing of the client on each server call. I put together a simplified load test case and wanted to get some feedback. It looks like using a singleton client is a significantly better choice and of the two engines I’ve tested (Apache and CIO) the CIO engine is a bit faster. I’ve put a github repo up with the code
https://github.com/sibandersen/ktorclientscale. Is that consistent with anyone else’s experience? Am I missing anything that would make my tests/conclusions invalid? Thanks in advance!