Oplog sizing in Kubernetes operators and managed MongoDB-compatible services
Parent: Oplog sizing under storage auto-scaling · Published reference · snapshot 2026-10-31
↓ Facts as markdownall context files
Source-anchored research for Oplog sizing in Kubernetes operators and managed MongoDB-compatible services. Run status: COMPLETED.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
How it works
- The Community Kubernetes Operator architecture describes MongoDB Agent orchestration that upgrades secondaries first and waits for their oplogs to catch up before an election. This is replication-aware rollout coordination; that document does not establish automatic resizing of the oplog when PVC capacity grows. (low confidence) (verified as of 2026-10-30) [source]
- Minimum oplog retention can allow MongoDB oplog growth beyond its configured maximum and exhaust disk space under high write volume. In a Percona deployment, autoscaling has a configured maximum; inference: retention-based sizing still requires capacity headroom and monitoring even when automatic PVC growth is enabled. (medium confidence) [source]
Measurements and reference values
- Amazon DocumentDB retains change events for three hours by default and allows change_stream_log_retention_duration to extend retention up to seven days. Its retention note says logs older than the configured duration are not deleted until log size exceeds 51,200 MB. Enabling change streams adds read/write I/O and storage costs. (low confidence) (verified as of 2026-10-30) [source]
Problems, failure modes and limitations
- AWS's DocumentDB page contains a retention caveat: logs older than change_stream_log_retention_duration are not deleted until log size exceeds 51,200 MB. This qualifies the same page's general statement that events are deleted after the retention window; do not interpret configured retention as a precise physical-storage deletion deadline. (low confidence) (verified as of 2026-10-30) [source]
- Azure DocumentDB documents a 400-MB active change log for standard change streams. This is a service-specific change-log limit, so it should not be substituted for a Kubernetes MongoDB oplogSizeMB policy. (low confidence) (verified as of 2026-06-04) [source]
- Azure DocumentDB historical change streams can retrieve archived logs beyond the active change log. With PITR log integration, documented recovery can extend up to 35 days or the cluster initialization point, whichever is earlier; the active 400-MB log therefore is not an absolute limit on all stream recovery. (low confidence) (verified as of 2026-06-04) [source]
Comparisons and alternatives
- For an existing operator-managed MongoDB oplog, use replSetResizeOplog for the runtime size change rather than relying on a changed replication.oplogSizeMB value or a restart. MongoDB documentation and the Percona troubleshooting answer also direct operators to update oplogSizeMB to persist the intended configuration. (high confidence) [source]
Facts and statements
- PVC expansion and oplog resizing are separate controls. Percona documents storageScaling as PVC growth, while MongoDB requires replSetResizeOplog to change an existing oplog maximum. Therefore, successful PVC autoscaling alone is not evidence that the configured oplog maximum or history window increased. (medium confidence) (verified as of 2026-10-05) [source]
- Percona Operator 1.23.1 documentation identifies usage-triggered PVC autoscaling as added in 1.22.0. It requires enableVolumeScaling and autoscaling.enabled, and exposes triggerThresholdPercent, growthStep, and maxSize. This automation covers replica-set and config-server PVCs, excludes mongos log PVCs, and requires an expansion-capable storage class. (low confidence) (verified as of 2026-10-05) [source]
- Percona's February 2023 engineering article demonstrates external pvc-autoresizer integration, not built-in usage-triggered operator resizing. Current documentation says enabling external autoscaling disables the operator's internal resize logic; using both simultaneously is unsupported. Historical external-resizer recipes therefore need version-specific interpretation. (medium confidence) (verified as of 2026-10-05) [source]
- The MongoDB Ops Manager Kubernetes resource's backup.opLogStores entries reference databases that store backup oplog slices. These backup stores are a separate capacity concern from the live replica-set oplog controlled by replication.oplogSizeMB. (medium confidence) [source]
- Amazon DocumentDB documentation explicitly says the service does not support MongoDB's oplog. Its change-stream events have a documented three-hour default retention, configurable from one hour to seven days with change_stream_log_retention_duration. MongoDB oplog-size procedures should therefore not be assumed to apply to DocumentDB storage growth. (low confidence) (verified as of 2026-10-30) [source]
- Percona supports MongoDB configuration through replsets.configuration and sharding.configsvrReplSet.configuration. An operator forum example confirms that replication.oplogSizeMB reaches mongod.conf, but that declarative startup setting does not resize an already-created oplog. (medium confidence) [source]
- Amazon DocumentDB automatically expands cluster-volume storage as data grows, but its documentation separately specifies a time-based change-stream retention setting. Inference: storage growth does not itself establish a longer change-stream resume window; configure retention independently. (medium confidence) (verified as of 2026-10-30) [source]
Children
- Percona storageScaling limits and oplog runtime resizing (frontier)
- Amazon DocumentDB change-stream retention (frontier)
- Azure DocumentDB active versus historical change streams (frontier)
Frontier under this node: Amazon DocumentDB change-stream retention, Azure DocumentDB active versus historical change streams, Percona storageScaling limits and oplog runtime resizing