Hello Shane, It's safe to share one java thin client between threads. The client in current implementation uses an exclusive lock on the connection while sending request and processing response. But in a high loaded application, using one client will give smaller throughput than using a connection pool (there are no benefits of using multiple threads).
There is no out of the box implementation of thin client connection pool in Ignite, you should implement it yourself if you need it. Also, I've prepared PR [1] to support async request sending from the thin client side. Thin client connection still thread safe, but process requests and responses independently, so a request can be sent while other threads still waiting for a response from server side. It will be great if someone reviews this fix. [1] https://issues.apache.org/jira/browse/IGNITE-11685 пт, 21 июн. 2019 г. в 04:04, Shane Duan <sduane...@gmail.com>: > Hi Igniters, > > I have a multithread application in which I plan to use the Ignite Java > thin client. Is it safe to share the client between threads? Or should each > thread create its own client connection? Is there a connection pool kind of > implementation for the Java thin client , like the one for JDBC? In the > context, multiple threads will try put/get cached values concurrently. > > Thanks! > > Shane >