Partitioned database q=1 single-node deployment: irreversible partitioning and compaction trade-offs for cost reduction
0 reputation · 18 May 2023, 07:22 UTC
0 reputation · 18 May 2023, 07:22 UTC
Evaluating a partitioned database with q=1 on a single node to reduce infrastructure costs for a low-traffic workload under 10 million documents. The goal is to eliminate cluster coordination overhead while maintaining query performance through partition-aligned access patterns.
Constraints include the irreversible nature of partitioned database creation, loss of global changes feed events for replication monitoring, requirement for manual compaction scheduling to avoid CPU spikes on small VMs, and the need to create Mango indexes explicitly for each new partition to prevent silent full-scan queries. Single-node deployment also removes automatic failover, shifting backup responsibility to external tooling.
q=1 on a single node significantly reduces infrastructure costs by eliminating cluster coordination and consensus overhead. However, this shifts the operational burden of data integrity and maintenance to the application layer. For workloads under 10 million documents, this approach is viable if access patterns are strictly partition-aligned.
ionice) to limit the disk priority of the compaction process, ensuring the database remains responsive.system.indexes collection before executing a query.notUsingIndex in MongoDB).Assumption: This analysis assumes a MongoDB-like architecture where Mango indexes and q-values refer to document-store and write concern.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.