cancel
Showing results for 
Search instead for 
Did you mean: 

Q service with multithreaded queue mode

devarsh206
New Contributor

Hi Team, I am trying to setup a q service with multithreaded input queue mode to serve data from disk. Disk has partitioned data by a unit, and each query will only access the data from that unit. A unit of data can be added /deleted during runtime informing service about the availability or unavailability of the unit and this will be done by main thread. 

I wanted to understand is there any issue in doing this as on site it is mentioned to not to use this mode for serving data from disk : https://code.kx.com/q/kb/multithreaded-input/ 

Thanks!

3 REPLIES 3

LeahS
Moderator Moderator
Moderator

Hello @devarsh206

Great content for our community! Thanks for sharing. 

From reading the documentation, the key take home is that it is inefficient and therefore, not advised. 

We welcome further feedback from our fellow community contributors. 

Kind regards, 

Leah 

fbodon
New Contributor II
New Contributor II

To avoid user queries blocking each other, you can set up a pool of q processes (HDBs) and use socket sharding as per https://code.kx.com/q/wp/socket-sharding/ or a TCP load balancer.

Yes, that can be done. But wanted to understand what is the issue in using already available mtim mode. 
As by this it will reduce the work and maintenance of load-balancers and gateways.