ElastiCache in 5 minutes

You can add ElastiCache to your AWS-based Datomic system in minutes:

  • Login to your ElastiCache management console and choose "Launch Cache Cluster"

  • Complete the wizard. You can accept all defaults.

  • Back at the console, select "Cache Security Groups":

ElastiCache Cache Security Groups console screenshot
  • …​ and authorize your Datomic system’s security group (default is "datomic"):

Authorized security group screenshot
  • Back at the console, select "Cache Clusters" and copy the node endpoints string:

Node endpoints string screenshot
    memcached=foo.use1.cache.amazonaws.com:11211
  • Set the node endpoints in your peer application code:

    System.setProperty
    ("datomic.memcachedServers",
     "foo.use1.cache.amazonaws.com:11211");

That’s all there is to it. Datomic will transparently use ElastiCache. There is no need to configure any cache timeouts, or change any code. Datomic’s key names will not conflict with any other use, so you can use the cache for other tasks as well.

You can also configure different caches for different processes in the system. For example, I keep a local memcached process running at the office, so from a cold peer (my development laptop) queries are fast, even when I am connecting to a transactor that is running in the AWS cloud.


← Previous post Keep Chocolate Love Atomic Next post → REST API