-1

I want to use DynamoDB to save application operation data at the end of a session for auditing purposes without affecting the actual application latency. Because this date is only for auditing so we don't want to impact our prod latencies. I have few questions for implementing this:

  1. Should I decouple the DB write activity with an SQS? So, the Db write delay will have no effect on the actual application?
  2. is publishing messages in SQS have the same latency as writing data in DynamoDB then we don't need SQS?
  3. what would be the best design technique for dealing with these scenarios?
3
  • 1
    Does your tech stack support multithreading?
    – Philipp
    Oct 28, 2021 at 8:10
  • yes we support multithreading
    – Saloni1308
    Oct 29, 2021 at 8:01
  • 1
    Will the audit data continue to have integrity if its recording is decoupled from the recording of the main activity?
    – Steve
    Nov 28, 2021 at 9:12

1 Answer 1

1

Just create a separate thread for sending the auditing data to the database. That way the main thread which runs the actual application won't be slowed down by any database activity which happens on the second thread(s).

If you don't want any congestion on the database which originates from auditing data to interfere with the performance of regular data at all, then a more extreme measure would be to set up an entirely separate DynamoDB instance just for the auditing data. While this might be more expensive, there might also be compliance arguments for doing that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.