OpenSearch segment replication vs document replication: which model fits your cluster
If your OpenSearch cluster shows indexing pressure or rising CPU on replica nodes, the question is how replicas stay in sync. Segment replication fits write-heavy clusters where the replicas are doing indexing work they do not need to repeat, while document replication remains the model where every shard copy indexes each document itself. The choice is a trade-off between indexing throughput and network use, so the decision should start from where your cluster spends its resources today.
With document replication, the primary indexes each document and forwards the operation to every replica, which then indexes it again. Every copy does the same analysis and segment work. With segment replication, the primary performs the indexing and copies the resulting segment files to its replicas, so replicas avoid repeating that work. The OpenSearch documentation describes the gain as higher indexing throughput and lower resource use, paid for with more network traffic, because whole segment files move between nodes. Check your network capacity between data nodes and your replica count before assuming the trade is favorable.
The documentation names two suggested use cases: clusters with high write loads that use longer refresh times, and log analytics clusters with low replica counts. Those are the situations where the saved indexing work is most likely to matter. Confirm your fit against your own metrics: compare replica CPU, indexing rate and inter-node bandwidth during peak ingest, and review the segment replication docs for the settings and version requirements that apply to the OpenSearch release you run. Also check whether your cluster design already depends on the replication mode, since changing it later affects the rest of your storage plan.
How document replication and segment replication keep replicas in sync
Every write to an OpenSearch index has to reach the replica copies of each shard, and the replication model decides what those copies do with it. The cards below compare the two models on the work each copy performs, the resources it consumes and the network traffic it creates.
Document replication reindexes on every copy
With document replication, the primary shard indexes each document and forwards the operation to every replica, which then performs the same indexing work. Each copy carries its own analysis, merge and segment build cost. Check CPU headroom on data nodes first, because indexing cost scales with the number of replica copies, not just the number of documents.
Segment replication copies finished segments
With segment replication, the primary indexes documents and then publishes the segment files it produces to its replicas, which receive those files rather than rebuilding them. Replicas skip the per-document indexing work and spend that capacity on serving search. Confirm how often replicas refresh to the primary's latest segments, since that interval sets how current search results on replicas can be.
CPU and indexing throughput
Segment replication moves indexing work off replica nodes, which is the basis for its higher indexing throughput and lower resource use under heavy writes. Document replication leaves replicas as busy as primaries during bulk loads. Measure indexing rate and CPU on data nodes under your real bulk profile before choosing a model, and do not assume the gain applies to every index.
Disk and merge behavior
Under document replication, each copy runs its own merges, so disk I/O repeats across copies. Under segment replication, replicas store the segments they receive and do fewer merges of their own. Review disk sizing and I/O graphs per node role, and confirm how your chosen version handles segment files on replicas during recovery and relocation.
Network traffic cost
The trade-off is network use. Segment replication sends segment files across the cluster, which adds traffic that document replication does not generate in the same form. Size inter-node bandwidth for peak refresh and merge output, especially across zones or racks. This cost is the main reason to test segment replication on the network you will actually run.
Where each model fits
Segment replication suits high write loads with longer refresh times and log analytics clusters with low replica counts, where the replication savings matter most. Document replication remains the simpler choice for mixed or search-heavy workloads that need replicas to reflect each write immediately. Ask your team which indexes write hardest and which need the freshest search results.
Segment replication docsHow a write reaches replica copies under each model
The diagram starts with an indexing request arriving at the primary shard. In document replication, the primary forwards the operation so each replica indexes the same document itself, which repeats the indexing work on every copy. In segment replication, the primary indexes once, produces segment files, and copies those files to the replicas, which then serve reads from the copied segments. Check which path your cluster uses, and watch the network traffic the segment copies add.
Write path to replicas under document and segment replication.
Choosing between segment and document replication by workload
This table compares document replication and segment replication across the factors that affect indexing, replica resources, network use and fit. Read each row against your own write rate, refresh interval and replica count, and treat any cell marked as a point to confirm as an item for testing in your environment. The main takeaway is that segment replication trades extra network traffic for lighter replicas, so it fits best where write volume is high and replica counts are low.
| Factor | Document replication | Segment replication |
|---|---|---|
| How replicas stay in sync | Each replica indexes every document itself | Replicas copy segment files from the primary instead of reindexing |
| Indexing throughput | Limited by the cost of indexing on every shard copy | Higher, because replicas skip per-document indexing work |
| Resource use on replicas | Replicas spend CPU on the same indexing work as primaries | Lower replica CPU for indexing, per the segment replication docs |
| Network traffic | Carries document operations to each replica | Carries segment files, so more network use; confirm bandwidth needs for your refresh pattern |
| Refresh behavior | Replicas see new data as the write path runs | Replicas receive data at segment refresh, so longer refresh times fit this model; confirm replica lag for your queries |
| Replica count | Works across the range of replica counts | Suited to low replica counts; confirm the effect of higher counts on network load |
| Best fit | Workloads that need replicas to mirror writes closely and where indexing capacity is not the constraint | High write loads and log analytics clusters with low replica counts |
| Items to confirm before choosing | Current defaults and version-specific behavior for your release | Feature support and prerequisites for your OpenSearch version, plus any interaction with remote-backed storage |
Where segment replication fits: high write loads and low replica counts
Segment replication fits best where the write path is the bottleneck. The OpenSearch documentation names two suggested use cases: clusters under high write loads with longer refresh times, and log analytics clusters that run with low replica counts. In both, the saving is the same. With document replication, every shard copy re-runs the indexing work for each document. With segment replication, the primary builds the segments once and copies the segment files to its replicas, so replicas spend less CPU and memory on indexing and the primary can take more writes before it saturates. Longer refresh intervals help too, because each copy-over moves a larger batch of finished segments rather than many small ones.
The trade-off is network traffic, and it grows with the number of replicas. Each replica receives its own copy of every new segment, so a cluster with several replicas per shard sends that data several times over the inter-node network. A log analytics cluster with one replica per shard sees a small multiple of the primary's segment output, which is why the pattern suits it. A cluster with more replicas, a constrained network between zones or data centers, or heavy merge activity that rewrites large segments will feel the cost much sooner. Check the network capacity between data nodes before you enable it, not after the first incident.
Do not decide from the documented use cases alone. Measure your own refresh interval and write rate against a test cluster that mirrors your shard count, replica count and node layout, and compare indexing throughput, primary and replica CPU, and inter-node bytes under both replication modes. Confirm the segment replication settings for your exact OpenSearch version in the segment replication documentation, including how replica lag shows up in your monitoring, since a replica that trails the primary changes what a search can see. Record the results so the decision can be repeated when write volume or replica counts change.
How to enable and validate segment replication on an index
This sequence takes a team from confirming its OpenSearch version and cluster layout to a measured decision on whether segment replication should go into production for a given index. The output is a tested index with recorded replica lag, network use and resource figures.
Confirm version and cluster topology
The platform or search engineer records the OpenSearch version, the number of data nodes, the cluster manager node layout and the replica count planned for the target index. Check these against the current OpenSearch cluster documentation, which recommends dedicated cluster manager nodes and replicas on separate nodes. Done means a written topology note exists that names the version, node roles and the index replica count, and the team confirms that the version is within maintenance before testing begins.
Review the segment replication settings
The engineer reads the segment replication documentation and identifies the setting that selects the replication model, and whether it is applied at cluster level or index level for the version in use. Confirm the exact key name, its accepted values and any prerequisites in the documentation for your version, and record them in the change ticket. Done means the team can state which setting turns segment replication on, where it is applied and what must be true before it can be changed.
Create a test index with segment replication
In a non-production cluster that matches the planned topology, the platform engineer creates a test index with the replication model set as the documentation describes, using the same shard count and replica count planned for production. Verify the index settings through the API and confirm that replica shards are allocated on nodes other than their primaries. Done means the index reports the intended replication setting and its replica shards show as allocated and healthy.
Load representative write traffic
The team replays or generates write traffic that matches production in document size, bulk batch size, refresh interval and peak write rate, ideally using recent production samples. Run the load long enough to include refresh cycles and merges, and repeat the same test with document replication on an identical index so the two results can be compared. Done means both runs have been completed with the same input and the team has a record of indexing rate and cluster behavior for each.
Measure replica lag and network throughput
During the load runs, the engineer watches replica lag, meaning how far replica segments trail the primary, along with network throughput between nodes and indexing latency. Use the cluster and node statistics APIs or your monitoring stack, and set alert thresholds that match the freshness your search users need. Done means the team has a table of lag, network bytes and indexing rate for both models, and any lag spikes are explained or resolved.
Check resource use and failover behavior
The engineer compares CPU, memory and disk I/O on data nodes under both models, and tests a controlled node restart or replica loss to confirm that recovery completes and that searches return consistent results during and after recovery. Confirm the cluster returns to green status. Done means resource figures and failover results are recorded, and the team has confirmed that recovery behaves acceptably for the workload.
Decide and document the rollout
The architect and workload owner review the recorded results against the workload profile, including whether write load is high, refresh times are long and replica counts are low, which are the cases the documentation suggests for this model. The decision, the index and cluster settings, the monitoring thresholds and the rollback method are written down and approved. Done means a signed-off record exists that states which indices use segment replication and the evidence behind that choice.
Security and operational considerations for replica traffic
Both replication models keep every replica current, but they spend resources differently. Segment replication moves more bytes between nodes, so the controls around traffic, access, monitoring and change management need to be designed before the switch rather than after the first incident.
Inter-node traffic capacity
Segment replication copies segment files to replicas instead of re-indexing each document on every copy, which shifts load from CPU to the network. Check the bandwidth between data nodes, especially across zones or racks, during merges and refreshes at peak indexing. Measure network use on a staging cluster with production-like write volume before setting the model on production indices. Confirm with your network team how much headroom the shared links have.
Segment replication docsTLS for node traffic
Replica copies travel between data nodes, so node-to-node traffic must be encrypted along with client traffic. The OpenSearch Security plugin provides TLS for both node and client traffic. Confirm that transport TLS is enabled on every node, that certificates are issued from your own CA, and that node identities are restricted so only approved nodes can join the cluster.
OpenSearch security docsRole-based access to index settings
Switching replication models is an index setting change, so the ability to change it must be limited to a small set of administrators. Define roles that separate index settings management from data read and write access, and review who holds cluster-level permissions. The Security plugin's role-based access control and audit logs can show who changed a setting and when, which supports later review.
Replica lag and recovery monitoring
Replicas that fall behind serve stale data and provide weaker protection if a node fails. Track replica lag, shard recovery activity and the time replicas take to catch up after a node restart, and set alerts for sustained lag. Test a node failure on a staging cluster under each model so you know how long recovery takes and how much extra traffic it generates before you rely on the setup in production.
Change control on live indices
Changing the replication model on an index in use affects indexing, recovery and capacity at once. Document the current settings, the target model, the affected indices and the rollback steps, then apply the change in a planned window with a named owner. Confirm with the vendor documentation which settings can change on an open index and which require reindexing or a new index, because that determines the rollback path.
Questions teams ask before choosing segment replication
How much work does switching to segment replication take?
The switch is mostly a configuration and validation effort, but the amount of work depends on whether the cluster is new or already running in production. Segment replication is set per index through the replication type, so a team can start with one index. The main drivers are the number of indices, how many replicas each one has, how much your workload depends on near-real-time search after refresh, and whether your monitoring and alerting account for the extra network traffic between primary and replica nodes. Ask any partner to list the indices in scope, the test steps for each one, and the rollback path if a replica lags.
Can our team test segment replication on its own?
Yes, a capable platform team can run a controlled test without outside help, provided it has a non-production cluster that resembles production in node count, shard layout and traffic. Start with one index that has a high write load or a low replica count, measure indexing throughput, replica lag, network use and heap pressure, and compare the results with the same index under document replication. Outside help usually adds value when the test needs realistic traffic replay, when the results must be documented for a change board, or when the team lacks time to repeat the runs. A fixed-scope engagement sets out what is tested and what evidence is delivered.
What do we need to provide for the work?
The work needs a few concrete inputs before it starts. Plan for these items:
- A test cluster that matches your production topology closely enough to be meaningful
- Representative traffic samples for indexing and search, including peak periods
- A named owner for the network path between data nodes, since replication traffic moves over it
- A named owner for storage and disk I/O on the data nodes
- A named owner for the index templates and application teams that write to the affected indices
Also confirm the exact OpenSearch version you run, because replication behavior is version-specific and should be checked against the docs for that release.
How long does validation usually take in our environment?
The length of validation depends on your environment, not on a fixed formula. The main variables are how many indices you test, how long your refresh intervals are, how many test cycles your change process requires, and how quickly your owners can provide the network and storage data. A team with a stable test cluster and clear traffic samples will finish faster than one that must first build the cluster. Ask for a schedule in the written scope with named milestones, and confirm which approvals, such as a change advisory board sign-off, sit on the critical path.
What does a consultant change in our cluster?
A consultant should change only what the agreed scope names. Typically that means the replication setting on the chosen indices, index templates for future indices, monitoring dashboards for replica lag and network use, and a runbook for operators. The consultant should not change cluster-wide settings, node roles or security configuration outside the scope. Ask for a change list before work starts, a record of every change made during testing, and a rollback procedure that your operators can run without the consultant present.
What drives the cost of this work?
Cost depends on the scope you agree in writing and on the infrastructure you already own. Two cost types apply. One-time costs cover analysis, test design, configuration, validation and documentation. Recurring costs, if you choose them, cover support, upgrades and continuous testing under a retainer. Infrastructure costs for test clusters, extra network capacity and storage are paid by you, whether a partner or your own team does the work. The main drivers are the number of indices, the size of the cluster, how many environments need testing, and how much evidence your compliance or change process requires. DeployOpen does not publish a price list, and a quote follows from the written scope.
Does segment replication increase network traffic and what should we check?
Yes. Segment replication copies segment files to replicas instead of indexing each document on every shard copy, which improves indexing throughput and lowers resource use at the cost of more network traffic. Before switching, check the bandwidth between data nodes during peak indexing, the link capacity between availability zones if you use zone awareness, and whether your network monitoring can show replication traffic separately. Also check how far replicas fall behind during refresh and merge activity, since a lagging replica affects search consistency and recovery time.
How DeployOpen scopes and delivers replication decisions for OpenSearch segment replication vs document replication
DeployOpen plans, builds, tests and documents the replication model for each OpenSearch cluster inside the client's own infrastructure, so the choice between segment and document replication is made against measured workloads. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.
How we scope
- The written scope lists the indices, write patterns, refresh intervals and replica counts that the replication decision must cover.
- We document current node roles, network topology and available bandwidth between data nodes before recommending a replication model.
- The scope names which test workloads, benchmarks and rollback conditions will be used to confirm the chosen model.
How we build
- We configure the cluster settings and index templates that select segment replication or document replication for each index group.
- We run indexing and recovery tests while watching replica lag, network throughput and node resource use against agreed thresholds.
- We align replica placement with shard allocation awareness so replicas land on separate nodes or zones as the design requires.
How we hand over
- Handover includes a written design record explaining which replication model applies to which index, and why.
- Runbooks cover changing replica counts, monitoring replica lag and reverting to document replication if a test fails.
- We document the test results and configuration files so your platform team can repeat the evaluation after future upgrades.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Retesting covers replication behavior after each OpenSearch minor version upgrade, since release notes can change defaults and settings.
- Your team should confirm current segment replication requirements and limits against the official OpenSearch documentation for your version.

