¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: API Stress Test


 

¿ªÔÆÌåÓý


Hi Gordon,

Node.js is being used as the twi-api itself (twi-api java api under the hood). ?The stress testing is to ensure javascript, which is accessing the java classes directly, is not starved.

Kind of like?ib_insync for python except this is for node/javascript.

So stressing to ensure the async and thread usage for the underlying java classes isn¡¯t preventing the node/javascript event loop from starving.

Thank you for the info on potential traffic volumes.

mark

On Jun 1, 2023, at 12:43 PM, Gordon Eldest via <hymagik@...> wrote:

On Wed, May 31, 2023 at 12:17 PM, Mark Murphy wrote:
For now, looking to exercise the API framework (it¡¯s node.js leveraging the java classes BTW). Since node requires async, non-blocking env, care must be taken not to starve node event loop. So trying to see how much data gets returned for sample requests and if or how long it takes for processMsgs() to finish up the queue. Agreed about time spent in the EWrapper methods.

My grain of salt: (waiting for market close...and as a MHO)
Node.js ought to be fast enough to handle every process events. (assuming you only do basic processing on it)

However Node is frequently associated with Mongo.?
If so you, will need to conduct your test in a way that accumulate a streaming traffic of at least 1GB of data if you want to stress your framework consistently.
With Mongo, use bson instead of json, work pretty well on first 500MB (assuming you dimension it with enough Ram) then it may start choking, generally because index take too much time to be computed.
In this business, the ratio "reads" vs "writes" is somewhere small. So indexes computation can be expensive related to performance increase on read.
Increasing RAM is a way to postpone some issue but increase risk of lost data on power failure (if this is an issue). Paradox: situation may worsen if you use replica, again because you may write way more data that you will ever read. Of course you can always delay index computation to post session.
If you use Mongo.



Join [email protected] to automatically receive all group messages.