ex_aws icon indicating copy to clipboard operation
ex_aws copied to clipboard

Support for DAX

Open Shayon opened this issue 5 years ago • 2 comments

I'd like to suggest this library build support for making Dynamo DB requests through DAX (Dynamo Accelerator)

What is DAX?

Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10x performance improvement – from milliseconds to microseconds – even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management.

Why support DAX?

This would allow consumers of this library to take their existing DynamoDB requests and point them to the DAX cache allowing them to take advantage of this managed, highly available cache. I am not necessarily suggesting that we have this work include DAX management, e.g. creating DAX clusters.

I'd like to get the conversation started on where we should get begin. For example, where should this work should live (https://github.com/ex-aws/ex_aws_dynamo or a new repo)?

Shayon avatar Jun 23 '20 00:06 Shayon

👍 for the idea. I am currently evaluating how to use DAX from Elixir / Erlang project that handles DDB table with up to 100K read units, so leveraging DAX would bring AWS costs down a lot and DAX seems more reliable than building something on top of ExAws.Dynamo to use self-hosted Redis (ElastiCache) cluster.

As for ideas to quickly get it done, there are several official DAX clients. The most likely candidate to use Port and leverage it directly would be: https://pypi.org/project/amazon-dax-client/ ErlPort supports Python out of the box: http://erlport.org/docs/python.html

What do you think about this approach @Shayon ? I know this is not ideal, but getting proper ExAws.Dynamo.DAX (sub?) module likely will take quite a bit of time to get it production-ready.

Long-term, I would be all for native Elixir implementation, most likely within ExAws.Dynamo, something like ExAws.Dynamo.DAX. Could be a different repo since implementation details are very different.

JakubCzarniecki avatar Jul 15 '20 10:07 JakubCzarniecki

I would definitely caution against using python. You'll lose any ability to do things in the normal Elixir concurrent style which will ruin whatever performance benefits you gain via the accelerated connection. We should aim for a native client. I don't get the impression it'd be particularly difficult to setup, it just requires someone to have time.

benwilson512 avatar Jul 15 '20 12:07 benwilson512