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"
stack: "tcp"
Distributed caching sample.
The distributed cache feature is not supported in Java version 8 and requires Java 11 or later.
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 . |
stack | Specifies the network configuration used for cache cluster communication. See Network configuration below for details. The default is tcp . |
Network configuration
Network configuration consists of intra-cluster communication along with the supported discovery method. You can configure the network configuration using the stack
property.
The network stack option, ensures effective communication among distributed cache nodes within a cluster. ADS supports the following stack options:
tcp
This is the combination of IP Multicast for cluster discovery and the TCP protocol for intra-cluster communication after cluster discovery.
kubernetes
This is the combination of DNS query for cluster discovery and the TCP protocol for intra-cluster communication after cluster discovery.
ImportantThis option is only supported in ADS Kubernetes distribution. See more information in the Final steps of the deployment using Kubernetes.
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
distributedCache
section of the ADS deployment file, create a new subsection namedtls
.In the
tls
subsection, add the following properties and set their values accordingly:keyStorePath
keyStorePassword
keyStoreType
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.