Scala/DynamoDB - GetItems going very slow -
i've function retrieves item dynamodb (app , dynamo running on same region) throughput pretty slow: near 200/sec - should be, @ least, 800/sec.
if remove function calls dynamodb, throughput increases 1380/sec.
here piece of code access dynamodb:
def findbykey(blacklistid: string): option[blacklist] = { val table = dynamodb.gettable(table_name) val spec = new getitemspec().withprimarykey("id", blacklistid).withconsistentread(true) try(table.getitem(spec)) match { case success(item) if item != null => val result: blacklist = item.tojson some(result) case success(item) if item == null => none case failure(e) => logger.error(e.getmessage, e) none } } anyone knows how can improve performance on requests?
Comments
Post a Comment