ElastiCache in 5 minutes

03 August 2012

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

    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 process 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.