Amazon ElastiCache is a caching service provided by AWS that helps improve the performance of your applications. It supports two in-memory caching engines: Memcached and Redis. When working with ElastiCache, it's essential to understand the network limits to ensure optimal performance and avoid any bottlenecks.
Maximum number of nodes per cluster:
Node bandwidth limits: The maximum bandwidth of an ElastiCache node depends on the instance type you choose. Node types with higher vCPU and memory resources tend to have higher network performance. Check the official documentation for specific bandwidth limits for each instance type.
ElastiCache subnet group limits: You can have up to 50 Amazon VPC subnets in a single ElastiCache subnet group.
Security groups per cache node: You are allowed to associate a maximum of 5 security groups per cache node.
To optimize your ElastiCache setup and avoid network bottlenecks, consider the following recommendations:
Here's an example of how to create a Redis cluster with cluster mode enabled using AWS CLI:
aws elasticache create-replication-group \ --replication-group-id your-replication-group-id \ --replication-group-description "Redis cluster mode enabled replication group" \ --automatic-failover-enabled \ --node-group-configuration "ReplicaCount=2,PrimaryAvailabilityZone=us-west-2a,ReplicaAvailabilityZones=us-west-2b,us-west-2c" \ --cache-node-type cache.m5.large \ --engine redis \ --engine-version 6.x \ --num-node-groups 3 \ --replicas-per-node-group 2 \ --cache-subnet-group-name your_subnet_group_name \ --security-group-ids sg-12345678 sg-23456789
Remember to replace
your_subnet_group_name, and the security group IDs with appropriate values.
Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.