Go functions, ElasticSearch Add and Mutex


(Dave Varma) #1

Hi,

I am using go functions to add entries into Elastic Search index.
I am using Bulk option to add multiple entries.
However, when I add entries, do I need to synchronize go functions so that two routines do not add entries concurrently ? Or does it not matter ?

Thanks,
Dave


(Kimbro Staken) #2

Assuming the bulk requests are independent then achieving high indexing throughput will require concurrency. Just be aware that ES will queue bulk requests as they come in so you want concurrency but not too much concurrency or you'll start overflowing those queues. What too much is will depend on the exact configuration and performance of the cluster.

Kimbro


(system) #3