You are not logged in.
I am doing a POC using mormot winhttp, json serializing to a local node.js express service. To test resilience, performance I execute two instances of test app (using winhttp performing in order of 1000 sequential POST's from each client concurrently) to EXPRESS service (all running on the same computer) and am finding that 1 client works fine but when i initiate POST from two clients simultaneously one client inevitably throws a Winhttp 12002 (operation timed out) error. Anyone have any experience with this, I am either 'abusing / misconfiguring' winhttp or have neglected to configure EXPRESS properly as it surely should not crumble under these conditions.
Initializing and POST request using winhttp is as follows
fclient := TWinHTTP.Create('localhost', '3002', False, EmptyStr,EmptyStr, 10000,10000,10000);
res := fclient.Request('test', 'POST', 0, Hdr.Header, EmptyStr, EmptyStr, outHDr, OutData);
Offline
Looks like your node app is slow Try to add a cluster module (https://nodejs.org/api/cluster.html#clu … w_it_works) to your node app
Offline
Sorry Arnaud I am not following your train of thought... what are you suggesting? Nothing obviously wrong with the above then and you would expect the same as I would from the POC?
Offline
Very interesting mpv, thanks for that, will definitely give it a go! I would have thought it shouldn't struggle though since I am doing quite basic operations, each POST insert a very basic record into a db.
Last edited by Del (2017-03-29 10:52:45)
Offline
Just in case this helps others... Issue turned out to be some blocking behaviour I implemented when committing to the database (not a node issue at all). I took the opportunity to implement clustering though and am thoroughly impressed with throughput and resilience gained from clustering.
Offline
@Del - in fact mORMot based server will be faster compared to node cluster (at last under Windows with HTTP API based server. I'm not check the latest WSAPoll based implementation)
Offline