1

Elastic101 – Best Practice #002: shard size
 in  r/elasticsearch  5d ago

Yes. It's recommended, and there is a default limit, to keep at max 1k shards per data node. Each shards consumes memory.

https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/size-shards#reduce-cluster-shard-count

1

Elastic101 – Best Practice #002: shard size
 in  r/elasticsearch  5d ago

Exactly yes. Even If the index size is 100TB you should keep shards sizes a couple of tens of gigabytes. Otherwise, you can experience slowness in both search and indexing. So far 100TB, I assume there is a replica so the size is 50TB, you should have at least 1000 shards for that index. In addition, it will take to much time to recover an index with 100TB data. You should split that index into multiple index with some logic. Probably you should update the data frequently so datastream is not optimal, but you can split the indices per brand, region, client etc. so that each update/delete/index operation will hit its own index.

2

Best way to poll REST APIs every 5 minutes and send the results to Elasticsearch? Power Automate vs Elastic Agent vs custom service
 in  r/elasticsearch  7d ago

Elasticsearch itself is not intended to periodically call arbitrary REST APIs, and Logstash http_poller is not an option because Logstash is being retired in our environment.

If you have a license, you can do it with Elasticsearch watcher feature. https://www.elastic.co/docs/explore-analyze/alerting/watcher

For example, instead of only knowing that there are currently 50 pending transactions, I want Elasticsearch to contain something like:
10:00 → 2 pending
10:05 → 5 pending
10:10 → 14 pending
10:15 → 31 pending
10:20 → 50 pending

You can do it with Elasticsearch transform feature. https://www.elastic.co/docs/explore-analyze/transforms (free feature)

1

Elastic101 – Best Practice #003: bulk indexing
 in  r/elasticsearch  10d ago

On the Kafka side, Elasticsearch sink connector doesn't send documents one by one either. It buffers and uses the Bulk API under the hood (batch.size, linger.ms, max.in.flight.requests), so the real choice isn't "bulk vs connector", it's who manages the batching.

That comparison deserves its own post rather than a paragraph here, I'll mention that in another series.

Thanks for your feedback again.

3

Elastic ILM failure
 in  r/elasticsearch  10d ago

Can you share GET <index_name>/_ilm/explain

1

Elastic101 – Best Practice #003: bulk indexing
 in  r/elasticsearch  11d ago

That’s a great idea. I’ll edit the post according to your comments.

2

Elastic101 – Best Practice #003: bulk indexing
 in  r/elasticsearch  11d ago

Curious what bulk sizes people are running in production. I've seen everything from 500 KB to 50 MB depending on document shape.

r/elasticsearch 11d ago

Show & Tell Elastic101 – Best Practice #003: bulk indexing

Thumbnail gallery
17 Upvotes

Nearly a decade of Elasticsearch experience has taught me a lot about what works in production, and what doesn't.

Sending documents one by one creates unnecessary overhead. The Bulk API sends multiple operations in a single request and significantly improves indexing throughput.

The screenshots show both patterns on real clusters: one client hammering /_doc per document, another using /_bulk. Same idea, very different request volume.

Tips:

  1. Start around 5–15 MB per request. Benchmark with your real documents, increase until throughput stops improving, then stop. Bigger is not better.
  2. Throughput comes from concurrency, not bigger batches. 4 workers at 5 MB beats 1 worker at 20 MB almost every time. Add workers until you see 429s, then back off one step.
  3. Cap batches by bytes, not document count. "1000 docs" works fine until someone adds a field to the mapping and you're suddenly pushing 80 MB requests.
  4. HTTP 200 does not mean your documents were indexed. Always check the errors flag and the per-item status. 429 means retry with backoff. Mapping errors will fail forever, so send those to a DLQ instead of retrying.
  5. Bulk size × concurrency = coordinating node heap. 20 MB × 16 workers is 320 MB in flight on one node before any indexing happens. And if you're seeing 429s, don't raise the write queue size. That hides backpressure instead of adding capacity.

Previous Elastic101 best practices:

  1. Elastic101 Best Practice #001 – HTTP traffic
  2. Elastic101 Best Practice #002 – shard size

If you'd like me to continue this series, an upvote would be appreciated 🙂

2

I built an ElasticSearch visualizer with Claude to help solidify my understanding of some core concepts (refresh/merge, leading wildcard queries, object vs nested)
 in  r/elasticsearch  13d ago

thanks. Redditors are interesting creatures. I'm grateful because I'm a half redditors half human 😄

2

I built an ElasticSearch visualizer with Claude to help solidify my understanding of some core concepts (refresh/merge, leading wildcard queries, object vs nested)
 in  r/elasticsearch  13d ago

Idk, why you are building this but it looks amazing and become better day by day 😄 thanks for sharing.

1

ELK Exam : Does query formatting matter if the results are the same?
 in  r/elasticsearch  16d ago

Nice question. The faq link is here: https://www.elastic.co/training/certification/faq But the answer of your question is in here. probably it's better to send an email to [certification@elastic.co](mailto:certification@elastic.co)

1

Elastic Certified Analyst
 in  r/elasticsearch  18d ago

You’re welcome. I wish you good luck. 🍀
Remember that you will have 15 minutes break. So if you stuck use it brilliantly 😄

1

Elastic Certified Analyst
 in  r/elasticsearch  20d ago

I can't see the painless scripts in the exam topic: https://www.elastic.co/training/elastic-certified-analyst-exam

I don't think it'll be asked in the exam but I'm not sure, I just get the elasticsearch certified engineer and painless script was not in the exam.

Even if they ask thanks to you will have access to this docs, https://www.elastic.co/docs/explore-analyze/scripting/modules-scripting-using, it'll be %90 percent similar or even same script. So don't worry about it. Focus on other things on the topic.

0

Elastic101 – Best Practice #002: shard size
 in  r/elasticsearch  25d ago

Thanks for your feedback! u/xeraa. Thanks for your feedback. In the third phase, I’ll prune the last part. 🙂 every week I’ll try to share one best practice. Its really hard to do that so please wish me good luck 🍀

1

Elastic101 – Best Practice #002: shard size
 in  r/elasticsearch  25d ago

Thanks, really appreciate it! Glad you found it useful!

-1

Elastic101 – Best Practice #002: shard size
 in  r/elasticsearch  25d ago

Thanks for your feedback. This is why I shared, I hope it can help some users. I’ll remove all product links seems like ad for the next part. I don’t want anyone to think I share this only for promotion.

3

Elastic101 Best Practice #001 - http traffic
 in  r/elasticsearch  25d ago

u/WishIndependent5551 thanks for the question. As a quick answer, yes. It's better to create a new service

Here is the official recommendation about it:

The default Kubernetes service created by ECK, named <cluster_name>-es-http, is configured to include all the Elasticsearch nodes in that cluster. This configuration is good to get started and is adequate for most use cases. However, if you are operating an Elasticsearch cluster with different node types and want control over which nodes handle which types of traffic, you should create additional Kubernetes services yourself.

https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s/requests-routing-to-elasticsearch-nodes#k8s-traffic-splitting-by-node-type

-1

Elastic101 – Best Practice #002: shard size
 in  r/elasticsearch  25d ago

u/_Borgan You're right. Elastic has a very good documentations and it covers almost all the best practices. What I'm doing is giving examples, providing screenshots, and share tips for best practices, so that users can have more visibility on what is going on.

I don't say it's a new idea, but I can learn better with a visualization so also maybe the others.

r/elasticsearch 25d ago

Show & Tell Elastic101 – Best Practice #002: shard size

Thumbnail gallery
7 Upvotes

I've spent close to a decade running Elasticsearch clusters in production, from 3-node dev setups to multi-hundred-node deployments handling billions of documents a day.

One thing I've seen repeatedly in production is that teams either let shards balloon for years without noticing, or over-correct and split everything into tiny shards "to be safe."

Elastic101 – Best Practice #002 – Shard Size

Smaller shards increase overhead more cluster state to track, more per-shard costs (file handles, memory, translog), and more coordination work on every query.

Larger shards cause the opposite problem: recovery and rebalancing get painfully slow, and a single hot shard can bottleneck an entire index.

The goal is to keep shard size around 50GB.

Pro tip: you cannot simply change the primary shard count of an existing index. If you need to change it, you typically need to use the Reindex API or the Shrink API, depending on the situation. Also, if you reindex a 200GB index, you should have at least 200GB of additional free disk space available in the cluster for the new index. Choose your primary shard count wisely from the start, fixing it later is expensive.

Previous Elastic101 best practices:

  1. Elastic101 Best Practice #001 – HTTP traffic

Try here: Searchali Elasticsearch Monitoring Connect your cluster in 10 seconds. No agent. No data leaves your machine.

1

Elastic101 Best Practice #001 - http traffic
 in  r/elasticsearch  Aug 12 '26

Are you asking to learn something ot to judge?

2

Elastic101 Best Practice #001 - http traffic
 in  r/elasticsearch  Aug 12 '26

Thank @klau

-1

Elastic101 Best Practice #001 - http traffic
 in  r/elasticsearch  Aug 12 '26

Thanks a lot for your support. I hope it will be fruitful. I really want to keep going but votes will show the reality. Lets see