AEM's clustering: configuring TarMK vs MongoMK for high availability

AEM clustering runs multiple AEM instances as one resilient service, so an instance, server or availability-zone failure does not become a content outage. It also introduces distributed-system risks, including stale replicas, configuration drift, election storms and recovery procedures that work only until they are needed. High availability therefore means more than adding servers; it requires defined recovery objectives and repeatable operations.

The repository choice shapes those operations. TarMK suits many publish estates, while MongoMK supports shared author repositories and more demanding scaling patterns, but each needs different infrastructure and safeguards. The CIRCUIT conference archive preserves sessions on AEM architecture, integrations and open source that can help teams compare approaches against the version and topology they actually operate.

Set measurable availability goals

A resilient design begins with a business promise, not an instance count. Define the recovery time objective (RTO) for returning service and the recovery point objective (RPO) for acceptable data loss. Then map each dependency to a failure scenario: process termination, failed disk, unavailable shared store, MongoDB election, bad deployment or loss of a site. These targets give architects a measurable boundary for topology and let operators rehearse against a known outcome.

Author and publish tiers need different answers. Losing a publish node mainly affects request capacity and cache freshness; losing an author node can interrupt content creation, approvals and scheduled publication. A publish cluster can remain available while authoring is degraded, yet that is a business-impact event. Include Dispatcher, the CDN, secrets, certificates and external identity in the design, because an available AEM process behind a failed dependency is not an available service.

Match the repository to the workload

For self-managed AEM 6.x deployments, TarMK stores Oak’s segment-oriented node data on local disk. Clustered publishing commonly uses a shared store such as Amazon S3 or Azure Blob Storage alongside supported publication and cache-invalidation processes. This model has fewer database components and works well when the main requirement is resilient content delivery. The object store remains a critical dependency: its account, credentials, region and network path need redundancy and monitoring.

MongoMK keeps the Oak node store in MongoDB while binaries remain in the configured file or blob store. Several AEM author instances can work against one logical repository, with a MongoDB replica set providing database failover. Where AEM support and database licensing allow it, MongoDB sharding can support very large estates, although it adds planning and operational complexity. Teams adopting MongoMK should treat replica-set elections, index creation, connection handling and database backups as part of the AEM operating model.

Neither option wins by default. A publish-only workload may gain simplicity from TarMK and a shared store; concurrent authoring, horizontal author scaling or advanced scaling requirements often justify MongoMK. Hybrid estates are common, with MongoMK behind author services and TarMK serving publish farms. Check the supported AEM, MongoDB, Java and storage combinations for the release in use; historical CIRCUIT sessions may describe older compatibility windows that should not be copied blindly into a current design. Managed AEM offerings may also constrain these choices, so confirm who owns repository configuration and failover.

Design around Australian failure domains

Australian topology starts with physical geography. Sydney and Melbourne host major public cloud regions, while many Brisbane organisations depend on those eastern regions for latency, support and procurement. Keep primary workloads close to users, but remember that NBN and commercial WAN links can vary by route and provider. A cross-city active-active design must include measured replication lag and a failover policy; equal instance counts alone do not remove distance or shared-network risk.

Place application nodes, MongoDB voting members and shared-store endpoints in separate availability zones where the platform permits. A three-member MongoDB replica set spread across faults can continue with a majority after one member fails; two members in one rack or zone merely duplicate the same failure. For protection from a metropolitan outage, establish a warm second site or an audited cross-region recovery service. Decide whether it is active-active, active-passive or backup-only, because that choice determines data consistency, cost and recovery time.

Local governance can constrain the design as much as geography. Australian financial, health and government customers may need data to remain in approved Australian regions, with obligations shaped by the Australian Privacy Principles, the Notifiable Data Breaches scheme and sector contracts. Retailer, media and public-sector workloads often expect 24-hour support, while budgets are commonly set in Australian dollars and local supplier integrations can add lead time. Importing test appliances or specialist hardware also brings customs clearance, biosecurity, electrical-safety and supplier obligations into the plan; order early rather than discovering those requirements during an outage drill.

Configure replication, failover and backups

Configure the publish tier first. Give every TarMK instance a repository on protected local storage, point it at the same supported shared store, inject credentials through a secrets manager and use TLS for every connection. Seed new nodes through an approved synchronisation or publication process rather than copying a live repository. Then verify Dispatcher cache flushes and CDN invalidation, because a technically healthy publish instance can still serve obsolete content if publication or purge paths fail.

For MongoMK, create a replica set with three data-bearing voting members across distinct hosts, and set priorities deliberately. Enable authentication, encryption in transit, private networking and IP allow-listing; do not expose MongoDB directly to the internet. Connect AEM through supported seed hosts or service discovery and let Oak manage its collections and indexes for that AEM release. Set read and write concerns deliberately, because majority writes improve consistency but add inter-zone or inter-city latency. Confirm how nodes identify themselves after failover and rehearse a primary election before production traffic depends on it.

Backups are a separate system, not a checkbox in the node configuration. Protect MongoDB snapshots and logs, the Oak repository or shared-store objects, binaries, AEM configuration, Dispatcher rules, certificates and secrets. Keep a copy outside the primary region and test restoration into an isolated environment. The archived CIRCUIT session on component versioning workflow shows how governed archival can complement reproducible releases, while a tested restore proves that archived content can actually be recovered.

Prove resilience through operations

Operate the cluster as one observable service. Track request success and p95 latency, JVM heap and garbage collection, disk pressure, Oak queues, compaction status, Dispatcher cache hit ratio, shared-store errors, MongoDB replication lag, election count, index health and backup age. Use a request identifier through AEM, Dispatcher and downstream APIs so a slow page can be separated from a slow dependency. The emphasis on measurable service operations and telemetry at DataOps Summit provides relevant context, even though its data-platform focus differs from AEM.

Failover should be expected to consume time. During a MongoDB election, active writes pause while the primary is selected and clients reconnect; health checks must avoid restarting healthy AEM processes and creating a storm. Keep spare publish capacity warm, cap reconnect attempts and use circuit breakers in surrounding integrations where supported. If authoring is unavailable, cached delivery may continue, but scheduled publication, preview and fresh content will degrade. Make those user-visible states part of the runbook and communications plan.

Use game days in addition to unit tests. Kill individual AEM processes, block the Mongo primary, throttle the object store, expire a certificate, introduce a bad package and simulate an availability-zone or metro failure. Measure actual RTO and RPO, inspect data consistency and ensure queues recover without duplicates or stale permissions. Include night-shift operators in Sydney and Melbourne, because a procedure that only works during local business hours is not resilient for an Australian operation.

Recommended actions for a resilient rollout

Use a staged rollout with explicit acceptance gates. A practical Australian implementation can proceed as follows:

  • Select TarMK or MongoMK per tier from workload, skill and version-support evidence, and record the failure modes each choice accepts.
  • Place MongoDB voting members and AEM nodes across independent availability zones; rehearse elections, scaling and capacity limits before go-live.
  • Automate backups of repositories, binaries, configuration and secrets, then restore them into a clean environment to verify the agreed RPO and RTO.
  • Operate one dashboard and one runbook for AEM, MongoDB, Dispatcher, shared storage and the CDN, with named owners and scheduled failure drills.

Start with the evidence already available in the archived programme: download the CIRCUIT mobile app to revisit relevant sessions, compare them with your current AEM release, and assign owners to the first architecture review and failover exercise.