Improve DynamoDB Performance with DAX

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 25

  • @lee-h3i7o
    @lee-h3i7o 4 роки тому +3

    Thank you for explaination. It is very helpful.

  • @andriys5772
    @andriys5772 2 роки тому

    Thank you very much! It seems I need DAX.

  • @sellerym
    @sellerym 3 роки тому +1

    Well done video, thank you.

  • @gautamjain6122
    @gautamjain6122 4 роки тому +2

    Hey, I was going through the DAX client code, and it turns out that it supports all read and write operations of Dynamodb so in a way for a web server, the only point of contact is the DAX cluster. We fire all the read/write queries to the DAX client and it internally manages cache update and expiry so the problem that you mentioned may never occur at all

    • @BeABetterDev
      @BeABetterDev  4 роки тому +1

      Hi Gautam,
      It isn't quite as simple to assume DAX 'manages the cache update and expiry'. There is still a threat of eventual consistency especially in failure mode scenarios where there is a delay between the time a record is committed to the cache and subsequently propogated into the dynamodb table.
      Also, if you have other threads/systems that are interacting directly with DynamoDB and bypassing the DAX cluster, the likelihood of stale data and eventual consistency is even greater.

    • @gautamjain6122
      @gautamjain6122 4 роки тому +1

      @@BeABetterDev completely agree with your point but I meant that the DAX client is pretty smart to handle a lot of the hard stuff for you so that the dev doesn't have to get their hands dirty solving the low-level stuff. As a dev, if we make sure that all the services only connect with DAX as a proxy to Dynamo then we can sideline a great deal of complexity and be able to effectively solve the cache invalidation issues for most of the use cases.
      As far as eventual consistency is concerned there are various cache update strategies - write-through, write around, write-back etc. We could get around the problem by choosing the right write strategy.

  • @sskabade
    @sskabade 4 роки тому +3

    Awesome 👍

    • @BeABetterDev
      @BeABetterDev  4 роки тому

      Glad you enjoyed and welcome to the channel!

  • @Dreamer-nh6gb
    @Dreamer-nh6gb 2 роки тому

    thank you!

  • @munteanionut3993
    @munteanionut3993 2 роки тому

    14:05 when you say "transactionally" updated.. do you mean that it follows the pattern of a transaction, meaning commiting/reverting changes? ie: it adheres to the ACID properties?
    Also 15:55 - what do you mean by "the authority on this data"? Do you mean the ground truth of the data? as in: the most recent version of the data, the "latest" / "final" / "true" data?

  • @DilpreetSingh-wq6eo
    @DilpreetSingh-wq6eo 2 роки тому

    Can we cache getallitems from table?

  • @tranminhhaifet
    @tranminhhaifet 2 роки тому

    thank you

  • @Yogita1411
    @Yogita1411 2 роки тому +1

    What’s better DAX or redis elasticache?

    • @BeABetterDev
      @BeABetterDev  2 роки тому +1

      I if you're looking to improve performance for your Dynamo DB table with cashing than DynamoDB DB accelerator is the correct choice. If you're looking for just general caching then redis with elastic cache would be better.

  • @maazm4722
    @maazm4722 3 роки тому

    Hello , what do you recommend cloudfront caching or DAX ?

    • @BeABetterDev
      @BeABetterDev  3 роки тому +1

      Hi Maaz, cloudfront is more for caching static assets such as html, css, js, img files, etc. DAX is for caching dynamodb records which tend to be object entities.
      Hope this clarifies.

    • @maazm4722
      @maazm4722 3 роки тому

      @@BeABetterDev It does thanks

    • @maazm4722
      @maazm4722 3 роки тому

      ​@@BeABetterDev last question , would you consider using dax with appsync ?

  • @vimalneha
    @vimalneha 3 роки тому

    Isn't there some Cache invalidation mechanism?

    • @BeABetterDev
      @BeABetterDev  3 роки тому +1

      Hi Vimal. To invalidate a key/value record you could simply write to it with null contents which will invalidate the record in DynamoDB. However keep in mind this approach will not work for cache's on Queries or Scans since the entire blob associated with the scan/query input will be cached. More details can be found here: docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.consistency.html

    • @vimalneha
      @vimalneha 3 роки тому

      @@BeABetterDev Many thanks for the Info and time taken to explain it to me.

    • @andriys5772
      @andriys5772 2 роки тому +2

      I found this helpful.
      You can specify the TTL setting for the query cache when you create a new DAX cluster.
      DAX also maintains an LRU list for the query cache. The list tracks when a result set was first written to the cache, and when the result was last read from the cache. If the query cache becomes full, DAX evicts older result sets (even if they have not expired yet) to make room for new result sets. The LRU algorithm is always enabled for the query cache, and is not user-configurable.
      If you specify zero as the query cache TTL setting, the query response will not be cached.