Automated stepdown and compactions for cloud

This guide explains how to set up automated compactions for your instance. Follow this link for more information about MongoDB space usage. Use this link for more information about the ObjectRocket automated compaction process.

What is a stepdown?

A stepdown is a graceful election to promote a new shard member as primary. The ObjectRocket shards come provisioned with 1 primary and 2 secondary members. The primary member willingly gives up its status and lets one of the secondaries be promoted. ObjectRocket uses stepdowns to allow for performing maintenance on shards members.

What is a compaction?

In ObjectRocket for AWS and GCP, a compaction occurs when ObjectRocket spins up 3 new members and mongo syncs the data between the old and new members. Once the data is synchronized to the new members we perform a step down to move the primary to the new member. The original members are then removed from the replica set and deleted.

The stepdown takes 5 to 15 seconds, during which time writes and primary reads can’t take place. Modern MongoDB drivers handle this operation gracefully, but you might need to restart the application to clear stale connections.

Contact support@objectrocket.com if you have any questions about compactions or stepdowns.

Scheduling compactions

Use the ObjectRocket API to sets schedules for compactions.

Reference the ObjectRocket API documentation for information about this process.

You can also contact ObjectRocket support to request a compaction if you are not familiar with the API.