Multi-Site Deployment
A multi-site NCache deployment distributes cache infrastructure across multiple availability zones or geographic regions. It can improve availability, support disaster recovery, and keep cache services close to applications and users.
Choose the deployment architecture according to the distance and network latency between sites:
- For availability zones within the same cloud region, distribute one NCache cluster across the zones.
- For geographically separated regions, deploy an independent cache cluster in each region and use NCache Bridge for WAN replication.
Important
Availability zones and geographic regions require different architectures. Zones generally provide low-latency connectivity within one region, while communication between regions takes place over a Wide Area Network (WAN).
Multi-Zone Deployment
A multi-zone deployment distributes the nodes of one NCache cluster across two or more availability zones within the same cloud region. Although the zones use separate physical infrastructure, they remain connected through the regional cloud network.
If a server or zone becomes unavailable, the remaining cluster nodes can continue serving client requests, depending on the cache topology and available capacity.
Deployment Layout
A typical multi-zone deployment includes:
- Application and cache servers distributed across multiple zones.
- One NCache cluster containing all cache servers.
- Private network connectivity between clients and cache servers.
- A cache topology that maintains replicas of cached data.
Application clients should be configured to connect to cache servers across the deployment rather than relying only on a server in their local zone. This enables client failover if a server or zone becomes unavailable.
Cache Server Distribution
Distribute cache servers and replicas so that one zone does not contain all cache nodes or all copies of cached data.
The number of servers required depends on:
- Expected transaction load and cache size.
- Cache topology.
- Number of availability zones.
- Required failure tolerance.
- Capacity needed after a server or zone failure.
Note
Deploying multiple cache servers in one zone protects against individual server failures but does not protect against a complete zone failure.
Network Planning
All cache servers and clients must communicate directly over the required NCache ports. Verify that:
- The zones are connected through the same Virtual Network, VPC, or routed private network.
- Firewalls and security groups permit client-server, server-server, and management communication.
- Private IP addresses or hostnames are reachable across zones.
- Network latency and bandwidth are sufficient for client traffic, replication, and state transfer.
Use private regional connectivity instead of routing cluster communication through public networks.
Topology and Capacity
Use a cache topology that maintains replicas when the deployment must tolerate a node or zone failure. Plan capacity for both normal and degraded operation.
After a zone failure, the remaining servers should have enough CPU, memory, and network capacity to support the workload and any required data redistribution. Otherwise, the cache may remain available but experience reduced performance.
Before deployment:
- Keep the NCache version and cache configuration consistent across all nodes.
- Test server failure, zone failure, client failover, and node recovery.
- Monitor state transfer after nodes are added, restarted, or replaced.
- Account for inter-zone data-transfer charges.
NCache Bridge is not required when all cache servers belong to the same regional cluster.
Multi-Region Deployment
A multi-region deployment runs applications and NCache infrastructure in two or more geographically separated regions. Each region contains an independent cache cluster that serves applications within that region.
Do not combine cache servers from separate regions into one stretched cluster. WAN latency and connectivity interruptions can affect cluster communication. Instead, use NCache Bridge to replicate operations between the regional cache clusters.
Deployment Layout
A typical multi-region deployment includes:
- An independent application deployment in each region.
- An independent NCache cluster in each region.
- Applications connected to their local regional cluster.
- One or more Bridge nodes for WAN replication.
- WAN, VPN, cloud peering, or secured public connectivity between regions.
Each region should be able to operate independently during a temporary inter-region network interruption.
Regional Client Connectivity
Applications should connect to the cache cluster in their local region. This minimizes latency and prevents routine cache operations from depending on WAN connectivity.
During regional failover, application traffic must be redirected to the recovery region, and the applications must be able to connect to its cache cluster.
WAN Replication Through Bridge
NCache Bridge asynchronously replicates cache operations between independent regional clusters. Local application operations do not wait for acknowledgment from the remote region.
Because replication is asynchronous, regional caches can temporarily contain different data. Plan for:
- Acceptable replication delay.
- WAN outages and queued operations.
- Initial synchronization and resynchronization.
- Update conflicts when multiple regions modify the same cache item.
- Bridge queue capacity and storage requirements.
Active-Passive Deployment
In an active-passive deployment, one region handles production traffic while another serves as the disaster recovery site.
NCache Bridge replicates operations from the active cluster to the passive cluster. If the primary region becomes unavailable, application traffic is redirected to the recovery region.
Use active-passive deployment when:
- One region is the primary production site.
- The secondary region is maintained for disaster recovery.
- Application writes normally occur in one region.
- A controlled failover process is acceptable.
The recovery environment must have sufficient application and cache capacity to support the workload expected during failover.
Active-Active Deployment
In an active-active deployment, applications in multiple regions serve users simultaneously. Each application deployment uses its local NCache cluster, while Bridge replicates operations between the regional clusters.
Use active-active deployment when:
- Users are distributed across geographic locations.
- Applications require low-latency regional access.
- Multiple regions process application traffic.
- Each region must continue operating during a WAN interruption.
Because multiple regions can update data, applications must account for replication delay and possible conflicts when the same cache item is modified concurrently.
Regional Capacity Planning
Plan each region independently. For every region, determine:
- Normal and failover workloads.
- Number and hardware profile of cache servers.
- Expected cache size.
- Replication traffic.
- Recovery Time Objective (RTO).
- Recovery Point Objective (RPO).
- Required NCache licenses.
A disaster recovery region can use lower capacity when reduced performance during failover is acceptable. For full-capacity failover, provision resources comparable to the primary region.
Bridge Availability
Bridge infrastructure should be designed so that the failure of one Bridge node does not interrupt replication between regions.
- Deploying redundant Bridge nodes.
- Providing sufficient memory and storage for replication queues.
- Monitoring Bridge connectivity and queue size.
- Securing Bridge communication with TLS.
- Allowing the required Bridge and management ports through firewalls.
- Testing replication recovery after network interruptions.
Configuration Consistency
Regional clusters are independent, but compatible configurations simplify replication and failover. Keep the following consistent unless the architecture requires otherwise:
- NCache version.
- Cache name.
- Serialization configuration.
- Security and TLS settings.
- Expiration policies.
- Application data contracts.
- Deployed providers and server-side modules.
Regional clusters can use different capacities, but comparable topologies simplify operational management.