I have a system where multiple clients make REST calls to my server, where I look up data in Aerospike and return them after some processing. I am using the same instance of Aerospike Java client to handle all the clients.
I am not able to find in the documentation whether client.get()
is a blocking operation or not. Should I create multiple thread-local instances of Aerospike clients to handle these requests?
If you're asking about the thread safety of AerospikeClient
, then the answer is that you can use a single client. Quoting the documentation :
This client is thread-safe. One client instance should be used per cluster. Multiple threads should share this cluster instance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.