AWS Elasticache
Last updated
Last updated
Copyright (c) Taskforce.sh Inc.
Elasticache is a managed caching service offered by Amazon Web Services (AWS), and it can be a good option when using BullMQ within the AWS infrastructure.
Here are some points to consider when using Elasticache with BullMQ within AWS:
Use the standard cache-nodes setup (i.e. not the serverless version, as serverless for the moment uses an incompatible maxmemory-policy)
In order to access your Elasticache instance you will need to create a security group that allows the instance to be accessible to the services running BullMQ instances.
4. You will need to specify a VPC and an Inboud rule. Most likely just a custom TCP with port range 6379 and some suitable source (anywhere works well for testing and in some simpler cases), remember that the cluster will not be accessible outside from AWS in any case. 5. Attach the security group to your Elasticache cluster and to the services that need to access it. 6. Make sure that you are using maxmemory-policy: noeviction in your Redis parameters. As you cannot modify any default parameter group you will need to create a new one.
7. Click on "Create". Then find the parameter group in the list. Click on Edit parameter values and then search for maxmemory-policy:
Change the value to "noeviction":
Save changes. Now you can go to your elasticache cluster and change the parameter group to your custom group. Just find your instance, click on modify and go to cluster settings where you can change the parameter group:
Preview changes and Modify. After this your cluster is ready to be used with BullMQ.