Skip to content

feat: Add DAX (DynamoDB Accelerator) support for online store#6133

Draft
abhijeet-dhumal wants to merge 4 commits intofeast-dev:masterfrom
abhijeet-dhumal:add-dax-client-support
Draft

feat: Add DAX (DynamoDB Accelerator) support for online store#6133
abhijeet-dhumal wants to merge 4 commits intofeast-dev:masterfrom
abhijeet-dhumal:add-dax-client-support

Conversation

@abhijeet-dhumal
Copy link
Contributor

What this PR does / why we need it:

This PR adds native support for Amazon DynamoDB Accelerator (DAX) to the DynamoDB online store, enabling sub-millisecond read latency for cached items.

##Configuration Options

  • use_dax (bool): Enable DAX client for read operations
  • dax_endpoint (str): DAX cluster endpoint URL (e.g., dax://my-cluster.xxx.dax-clusters.us-east-1.amazonaws.com)

Implementation

  • Added DAX client/resource initialization using amazon-dax-client package
  • DAX client is API-compatible with boto3, requiring minimal code changes
  • Graceful fallback to standard DynamoDB when DAX package is not installed
  • Config validation ensures dax_endpoint is provided when use_dax=True

Dependencies

  • Added optional dax extra: pip install feast[dax]
  • Includes amazon-dax-client>=2.0.0,<3

Usage

# feature_store.yaml
online_store:
  type: dynamodb
  region: us-east-1
  use_dax: true
  dax_endpoint: dax://my-cluster.xxx.dax-clusters.us-east-1.amazonaws.com

Which issue(s) this PR fixes:

#6059

Misc

DAX does not support control plane operations like DescribeTable, CreateTable,
or DeleteTable. These must use the regular DynamoDB client regardless of
whether DAX is enabled for data operations.

This fix ensures:
- update() method uses regular DynamoDB for table existence checks and creation
- teardown() method uses regular DynamoDB for table deletion
- online_read() and online_write_batch() continue to use DAX for data ops
The _get_dynamodb_client/resource methods cache the first client created.
When update() creates a non-DAX client first, it gets cached and reused
by online_read() even when DAX is enabled.

Fix: Use _initialize_dynamodb_* directly in update() and teardown() to
create fresh non-cached clients, allowing the cached versions to be
created by data operations (online_read/online_write) with DAX enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant