KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Q service with multithreaded queue mode

  • Q service with multithreaded queue mode

    Posted by devarsh206 on January 18, 2022 at 12:00 am

    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!

    devarsh206 replied 9 months, 1 week ago 3 Members · 3 Replies
  • 3 Replies
  • leahs

    Member
    January 18, 2022 at 12:00 am

    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

    Member
    January 19, 2022 at 12:00 am

    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.

  • devarsh206

    Member
    January 19, 2022 at 12:00 am

    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.

Log in to reply.