Deployment
Follow the instructions below to enable and configure the distributed cache feature.
Enable distributed cache
In the deployment configuration file, under distributedCache set the value of the enabled property to true.
distributedCache:
enabled: true # Required
## Optional ##
port: 9091
mode: "REPL_ASYNC" or "REPL_SYNC"
clusterName: "axio-cache-cluster"
discoveryMethod: "multicast" or "dns"
## if set to "dns" then: ##
## dnsQuery: <point to a DNS service that provides A/SRV records of the ADS instances>
Distributed caching sample.
Optional properties
This is a list of all configurable properties for the distributed caching feature in the deployment configuration file.
In case you don't configure one or more of the optional properties then their default values will be used.
| Property | Description |
|---|---|
port | Specifies the port number used for communication within the distributed cache cluster. The default is 7800. |
mode | Determines the replication mode for the distributed cache. It can be set to either REPL_ASYNC for asynchronous replication or REPL_SYNC for synchronous replication.Synchronous mode is recommended for data consistency, while asynchronous mode can be used when prioritizing speed. The default is REPL_ASYNC. |
clusterName | The unique identifier of your cache cluster. The default is axio-cache-cluster.NOTE: All ADS instances that participate in the same cache cluster should have the same clusterName. |
discoveryMethod | Specifies the discovery method used for cache cluster formation. See Discovery method configuration below for details. The default is multicast.NOTE: The discoveryMethod property has replaced the stack property that was previously supported in ADS 1.13.0, with options tcp or kubernetes. However, stack property is still supported. |
Discovery method configuration
The discoveryMethod configuration property specifies the underlying mechanism used by a node to identify other members of the cluster. ADS supports the following discoveryMethod options:
multicastThis is the combination of IP Multicast for cluster discovery and the TCP protocol for intra-cluster communication after cluster discovery.
dnsThis is the combination of DNS query for cluster discovery and the TCP protocol for intra-cluster communication after cluster discovery. When the
discoveryMethodproperty is set todns, another configuration parameter calleddnsQueryis also needed.infoWhen using Helm charts provided by Axiomatics,
dnsQueryvalue is generated by the cluster name. You can overwrite the provided value by setting your own.
See more information in the Final steps of the deployment using Kubernetes section.
In case that you disable the distributed cache feature, that is to set the enabled property to false, then make sure that the discoveryMethod and dnsQuery sub-properties are not set.
Encrypt cluster communication
Optionally, you can use TLS (Transport Layer Security) or SSL (Secure Sockets Layer) encryption with distributed caching to significantly enhance the security of data exchanged between caching nodes and to further increase overall security. To use SSL/TLS encryption you have to configure a keystore that contains public and private keys.
The TLS option is not supported for Kubernetes deployments.
Create or import a keystore that contains your public and private keys.
The keystore should be in a format that your system supports, such as PKCS#12 (Public Key Cryptography Standard #12).
In the
distributedCachesection of the ADS deployment file, create a new subsection namedtls.In the
tlssubsection, add the following properties and set their values accordingly:keyStorePathkeyStorePasswordkeyStoreType
distributedCache:
enabled: true
port: 9091
mode: "REPL_ASYNC" or "REPL_SYNC"
clusterName: "axio-cache-cluster"
discoveryMethod: "multicast"
tls:
keyStorePath: file:<path_to_file>/server_keystore.p12
keyStorePassword: <your_keystore_password>
keyStoreType: PKCS12
Distributed caching with TLS enabled.
While TLS is not required for distributed caching, all tls properties are required if you enable it.