Connecting Redis as an Online Store
All Tecton deployments include support for a DynamoDB Online Store by default. You may optionally configure Redis to use as the Online Store with Tecton. If you're wondering which store is best for you, read this Tecton blog post.
In order to use a Redis Online Store, follow this guide to connect Tecton to your Redis Enterprise Cloud or Amazon ElastiCache for Redis cluster.
Configuring ElastiCache for Tecton
Cluster Requirements
The Redis cluster you connect to Tecton should only be for use with Tecton. Tecton requires specific cluster configuration, depending on which managed version of Redis you're using.
When creating your ElastiCache cluster, ensure your cluster meets the following requirements:
- Redis Cluster Mode Enabled
- Multi AZ Enabled
- At least one replica per shard
- Redis Version 6.x
Setting up your ElastiCache Cluster
You can set up an ElastiCache cluster either using the AWS Console or through terraform. This sample terraform script creates a cluster based on Tecton's requirements.
resource "aws_elasticache_subnet_group" "tecton_<customer_name>_redis_cluster_subnet_group" {
name = "tecton-<customer_name>-redis-cluster-cache-subnet"
subnet_ids = XXXX
}
resource "aws_elasticache_replication_group" "tecton_<customer_name>_redis_cluster" {
replication_group_id = "tecton_<customer_name>_redis_cluster"
replication_group_description = "tecton-<customer_name>-redis-replication-group"
node_type = "cache.m5.xlarge"
port = 6379
automatic_failover_enabled = true
engine = "redis"
engine_version = "6.x"
multi_az_enabled = true
parameter_group_name = "default.redis6.x.cluster.on"
# Eight shards. One replica per shard.
cluster_mode {
replicas_per_node_group = 1
num_node_groups = 8
}
security_group_ids = [XXXX]
subnet_group_name = "tecton-<customer_name>-redis-cluster-cache-subnet"
depends_on = [aws_elasticache_subnet_group.tecton_<customer_name>_redis_cluster_subnet_group]
}
node_type
, number_of_shards
, and replicas_per_node_group
values can be tuned based on your workload.
Additionally Tecton recommends enabling TLS and Redis AUTH.
Optional Backups
You may want to configure automatic or manual backups for faster data recovery in case of a cluster-wide failure.
Connecting Tecton to your ElastiCache cluster with VPC peering
Once your cluster has been configured, Tecton Customer Success will help complete the connection with VPC peering.
Create a Tecton Support ticket the following information:
- The Configuration Endpoint for your Redis Cluster found in the AWS Web Console
- VPC's account ID
- VPC ID
- AWS Region
- Relevant CIDR blocks containing the ElastiCache cluster
Tecton will then send a VPC peering request, and provide instructions on how to finish setting up networking and authentication.
Validating the connection
Once Tecton has completed connecting to your ElastiCache cluster, you should test writing and reading feature data.
To materialize a feature view to Redis, simply specify the RedisConfig in your feature view definition by adding the online_store=RedisConfig()
the Feature View declaration.
Once the materialization jobs have been completed, you can use the FeatureView.get_online_features()
command to test reading features from your Redis Cluster.
Configuring Redis Enterprise Cloud for Tecton
Please contact Tecton Customer Success for assistance configuring your Redis Enterprise Cloud cluster for use with Tecton.