Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified Developer Associate Time Mode Diagnostic Set Question error on DAX ?

  • Time Mode Diagnostic Set Question error on DAX ?

  • roberto-sebastiano

    Member
    December 3, 2021 at 11:08 pm

    A code that runs on a Lambda function performs a GetItem call from a DynamoDB table. The function runs three times every week. You noticed that the application kept receiving a ProvisionedThroughputExceededException error for 10 seconds most of the time.

    How should you handle this error?

    The answer DAX should be correct because it would reduce the number of GetItem requests as they are read request to DynamoDB.. Can you explain why it’s wrong ?

    In the explaination it says “This option is not the right way to handle errors due to high request rates.” but according to AWS on DAX benefits:

    “Applications that are read-intensive, but are also cost-sensitive. With DynamoDB,
    you provision the number of reads per second that your application requires. If
    read activity increases, you can increase your tables’ provisioned read
    throughput (at an additional cost). Or, you can offload the activity from your
    application to a DAX cluster, and reduce the number of read capacity units
    that you need to purchase otherwise
    .”

    https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.html

    Thank you

  • Carlo-TutorialsDojo

    Administrator
    December 4, 2021 at 3:24 am

    Hello roberto,

    DAX would only be effective for items that are read repeatedly. Take note that it is still a caching solution, the performance gain in reads only applies to items that are already stored in the cache, your DAX cluster stills need to fetch data from the DynamoDB table, hence it still consumes RCU. Since the ProvisionedThroughputExceededException is an error at the DynamoDB level, you can either increase the provisioned RCU or handle the error thru error retries and exponential backoff.

    Let me know your thoughts.

    Regards,

    Carlo @ Tutorials Dojo

  • roberto-sebastiano

    Member
    December 5, 2021 at 6:51 pm

    Yes but the question says “most of the time”, it means that the application can run fine sometimes with the already provisioned RCU and other times it gets error.

    Since DAX lowers your needs for RCU, it could be a solution given the question

    What do you think ?

    Regards,

    Roberto

    • Carlo-TutorialsDojo

      Administrator
      December 7, 2021 at 4:33 am

      The scenario begs for a solution that will handle intermittent ProvisionedThroughputExceededException errors. In programming, you can think of it as implementing a try and catch logic. DAX only saves RCU when reading in cache objects but not for cache misses since new updates inserted into the table are not automatically reflected in the DAX cluster. You’re implying that one should cache the objects to get around the RCU limitation. That is not the main objective of using DAX. You should also consider the workload, the manner, and the frequency with which data is retrieved.

Viewing 1 - 3 of 3 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now