🏗️ DevOps & Infrastructure

The _id Sort That Nuked Our OpenSearch Cluster in Minutes

You tweak one sort field for stable pagination. Boom—your OpenSearch cluster chokes on heap memory. This is the story of a tiny change with massive fallout.

JVM heap spiking to 99% on OpenSearch dashboard after _id sort deploy

⚡ Key Takeaways

  • Never sort on _id or metadata fields—lacks doc_values, triggers heap-killing fielddata. 𝕏
  • Doc values (disk, index-time) beat fielddata (heap, query-time) for prod sorts/aggs. 𝕏
  • Audit mappings and queries pre-deploy; staging hides scale pitfalls. 𝕏
Published by

theAIcatchup

Community-driven. Code-first.

Worth sharing?

Get the best Open Source stories of the week in your inbox — no noise, no spam.

Originally reported by Dev.to

Stay in the loop

The week's most important stories from theAIcatchup, delivered once a week.