What is best practice for inserting record with Java client

  1. do I need to implement retry-mechanism myself?
  2. if I use built-in retry-mechanism, what is the best policy parameter: e.g. (default value) maxSocketIdle = 55 (clientpolicy) socketTimeout=30000 totalTimeout=0 maxRetries = 2 I think this default configuration is not good, when retry happen, total timeout = min(maxSocketIdle,socketTimeout*2)=55s, is it too big?

Note that the default maxRetries value is different for read (2), write (0), and scan/query (5) operations. Since by default, there is no retry for inserting a record (a write operation), your application must retry as necessary. Also set “recordExistsAction” value in the write policy appropriately.

The various timeout values are in milliseconds. maxSocketIdle is used for connection pool management and not relevant to a server request. Socket timeout default is 3000ms (not 30000ms).

© 2021 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.