ElastiCache (Redis)
Overview
ElastiCache provides managed Redis caching clusters for your application. Tapitalee automatically provisions Amazon ElastiCache Redis instances in your AWS account, offering high-performance in-memory data storage for caching, session management, and real-time analytics.
Purpose and Benefits
- High-Performance Caching: In-memory data store with sub-millisecond latency
- Session Storage: Persistent session management across application restarts
- Data Structures: Rich data types including strings, hashes, lists, sets, and sorted sets
- Scalability: Easy scaling with cluster mode and read replicas
- Persistence: Optional data persistence with snapshots and append-only files
- Integration: Automatic environment variable injection for seamless app connectivity
CLI Usage
Create ElastiCache Redis Cluster
tapit create elasticache engine=redis name=cluster_name [variable=REDIS_URL] [size=cache.t4g.micro] [cache_eviction=yes]Required Parameters
engine: Must beredis(currently the only supported engine)name: Cluster name (alphanumeric, used for ElastiCache cluster identifier)
Optional Parameters
variable: Environment variable name for Redis connection URL (default:REDIS_URL)size: ElastiCache node type (default:cache.t4g.micro)cache_eviction: Enable automatic eviction of least recently used keys when memory is full (default:yes)
Examples
# Basic Redis cluster
tapit create elasticache engine=redis name=cache
# Redis with custom configuration
tapit create elasticache engine=redis name=sessionstore variable=SESSION_REDIS_URL size=cache.r7g.large
# Redis without eviction (for persistent data)
tapit create elasticache engine=redis name=datastore cache_eviction=noList and Show ElastiCache Clusters
# List all addons (including ElastiCache)
tapit list addons
# Show specific ElastiCache details
tapit show addon name=cluster_nameDelete ElastiCache Cluster
tapit delete addon name=cluster_nameWarning: This permanently deletes the Redis cluster and all cached data. Consider creating a backup if you have important data.
Environment Variables
When you create an ElastiCache cluster, Tapitalee automatically injects connection details as environment variables:
REDIS_URL(or custom variable name): Complete Redis connection string
Connection String Format
redis://[password@]hostname:6379[/database_number]Security
- Encryption: Data encryption in transit is enabled by default
- Access Control: Only your Tapitalee application containers can access Redis by default
- VPC Security: Redis instances are isolated within your VPC
Instance Types and Performance
Burstable Performance (T4g)
- cache.t4g.micro: 2 vCPUs, 0.5 GB RAM - Development/testing
- cache.t4g.small: 2 vCPUs, 1.5 GB RAM - Small applications
- cache.t4g.medium: 2 vCPUs, 3.2 GB RAM - Medium workloads
Memory Optimized (R7g)
- cache.r7g.large: 2 vCPUs, 13.1 GB RAM - Memory-intensive caching
- cache.r7g.xlarge: 4 vCPUs, 26.3 GB RAM - High-performance applications
- cache.r7g.2xlarge: 8 vCPUs, 52.6 GB RAM - Large-scale caching
Compute Optimized (C7g)
- cache.c7g.large: 2 vCPUs, 3.4 GB RAM - CPU-intensive workloads
- cache.c7g.xlarge: 4 vCPUs, 6.8 GB RAM - High-performance computing
Cache Eviction Policies
With Eviction (cache_eviction=yes)
- By default, Redis removes least recently used keys when memory limit is reached
- Ideal for: caching, session storage, and temporary data
Without Eviction (cache_eviction=no)
- This sets the redis noeviction policy, which will return errors when memory limit is reached
- This guarantees existing data won’t be lost if you hit the memory limit
- Ideal for: Persistent data, queues, data that shouldn’t be lost