← Joburi

MongoDB Expert — Optimize Slow Queries/Aggregations on Production Atlas (M20, no tier upgrade)

Buget: $100.0 FIXED / ⭐ 4.98 (26) India

mongodb, node.js, java

MongoDB Atlas Performance Optimization — Production (M20, ~30 GB) ▎ We run a production SaaS backend on MongoDB Atlas (replica set, M20 tier, ~30 GB dataset). Backend is Java / Spring Boot microservices using Spring Data MongoDB. Under load we see slow queries ▎ and heavy aggregations, occasional CPU spikes and brief replica-set elections, and some list/search endpoints that take minutes instead of milliseconds. ▎ Important: we want to stay on the M20 tier — the goal is to optimize queries, indexes, and configuration to fit within current resources, not to scale up hardware. We'll only consider a tier ▎ change as a last resort. Scope of work ▎ - Identify the slowest/most expensive operations using Atlas Profiler, Performance Advisor, and server logs. ▎ - Analyze with explain(); design and implement targeted compound indexes. ▎ - Optimize heavy aggregation pipelines — e.g. a paginated listing endpoint that does a $lookup over a large (millions of docs) collection then filters post-join, and an unindexed regex/text ▎ search that scans the collection. Recommend the right approach (index, pipeline restructure, or Atlas Search where justified). ▎ - Add query time-bounds (maxTimeMS) and tune client connection pool sizes + socket timeouts so a runaway query can't pin the cluster. ▎ - Reduce working-set / WiredTiger cache pressure so hot data fits in M20 RAM. ▎ - Advise on data retention/archival for bloated collections. ▎ - Set up alerts (CPU, slow ops, connections, primary elections) and a short runbook. Deliverables ▎ - Prioritized findings report (with explain() evidence). ▎ - Implemented/recommended index + query changes with before/after metrics (latency, docs examined, CPU). ▎ - Connection-pool / timeout / retention recommendations. ▎ - Brief documentation + monitoring/alert setup. Required skills ▎ - Deep MongoDB internals + Atlas experience (replica sets, WiredTiger cache, oplog). ▎ - Proven aggregation-pipeline optimization and indexing strategy (compound indexes, ESR rule, covered queries). ▎ - Comfortable reading explain() plans and Atlas metrics. ▎ - Spring Data MongoDB familiarity is a strong plus (so fixes map cleanly to our code).
Deschide pe Upwork