Is rpc processing on MultiChain single threaded?

+1 vote

We have a proxy component in front of our MultiChain instance.

I am now thinking about queueing rpc requests to a single MultiChain to only allow one request after another, since we ran into some issues where too many requests were send to the MultiChain in parallel.

Now my question is:

Would this make sense or is MultiChain at least in some cases multi-threaded.

E.g. if there is a huge "liststreamitems" read request that takes 30 Seconds, is MultiChain able to process another simple request like "getinfo" (if there is another rpc thread available) in parallel, or does this request block until the other long running rpc request is done?

asked May 8, 2019 by Xen

1 Answer

0 votes
The answer is that RPC processing is not itself single threaded, but there are some mutex locks that are required by a large proportion of API commands. So in practice you'll often find that the RPC endpoint behaves as if it is almost single-threaded. Generally it's not worth running more than a few RPC calls in parallel.
answered May 9, 2019 by MultiChain