koopjs / koop-provider-marklogic

A Koop Provider that can be used to exposed data in MarkLogic via Esri feature services
https://koopjs.github.io/koop-provider-marklogic/
Other
6 stars 11 forks source link

Token generation request - Performance issue for Marklogic based authentication with concurrent users #178

Open MayuriSivanesan opened 2 years ago

MayuriSivanesan commented 2 years ago

We have used marklogic based authentication for our koop-provider application and have begun load testing of about 100 concurrent users. With every request the time taken to fetch the token gradually increases. Some of them taking nearly more than 70secs to complete token generation request. This causes request timeout error after about 24 concurrent requests through the koop provider. We have also added the diagnostic data for better understanding. The REST endpoint we tried to access: https://myhost/marklogic/token And the time taken to complete each response is shown as graph in the attached image MicrosoftTeams-image (3) And this the error log we get on server multiple times for concurrent request {"address":"","code":"ETIMEDOUT","errno":"ETIMEDOUT","level":"error","port":,"syscall":"connect"} {"level":"debug","message":"resolving connection error connectionInfo:"} {"level":"debug","message":{"error":true,"errorMsg":"connect ETIMEDOUT :"}} {"level":"debug","message":"response from connectClient: "} {"level":"debug","message":{"error":true,"errorMsg":"connect ETIMEDOUT :"}} {"level":"debug","message":"MarkLogic error"} Error: connect ETIMEDOUT : at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) { errno: 'ETIMEDOUT', code: 'ETIMEDOUT', syscall: 'connect', address: '', port: } Error: connect ETIMEDOUT : at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) { errno: 'ETIMEDOUT', code: 'ETIMEDOUT', syscall: 'connect', address: '', port: } {"level":"debug","message":"error occurred:"}

MayuriSivanesan commented 2 years ago

Changed authentication to file-based authentication which reduces the request time.

jkerr5 commented 2 years ago

We should keep this issue open as switching to file-based auth is not an option for everyone.

mitchshepherd commented 1 year ago

Hello @MayuriSivanesan. Are you still using Koop with MarkLogic? Can you provide more information for what type of authentication you require?