Am using plain webBroker Delphi 10.4.1
I have a server that accepts a Json String. I parse it and send the same data back (for simplicity sake) to the client.
My assumption is Webbroker has default 32 threads (web module instances) that will be created on the server - progressively, as concurrent client requests start hitting the server and stop at 32 (refer web.webreq.pas)
To test this scenario I have created a simple Client program that has a For-loop that will keep firing at the the server with a request that will carry a JSon String.
For 10,000 requests it takes about 14 seconds. Only ONE instance of the webModule gets created...which is fine because the for loop sends the request in a serial fashion in an SYNCHRONOUS mode.
When I run another (parallel) instance of the client program, the 2nd instance of the WebModule gets created....fair enough. When I run one more parallel instance of the client, the 3rd instance of the WebModule gets created....so on and so forth
Now is the interesting part....
Remember the time taken for 10K request which is 14 seconds when only my first Client program was running? As I increase the number of concurrent clients, the time taken to process also increases
If the Server was truly Multi-threaded as claimed, then at least up to 32 concurrent client requests the time taken should be the SAME to process individual 10K records from each client, right? That is in 14 seconds all 3 client program requests (amounting to a total of 30K requests) must have been completed. It takes thrice the time roughly about 42 seconds
Can someone pls clarify if Web Broker is truly Multi-threaded? And if so what is it I am missing?