# Naive question about multiple clients

**URL:** <https://discuss.elastic.co/t/naive-question-about-multiple-clients/19789>\
**Category:** Elasticsearch\
**Created:** [September 15, 2014, 1:58pm UTC](https://discuss.elastic.co/t/naive-question-about-multiple-clients/19789 "2014-09-15T13:58:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackpark](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jackpark](https://discuss.elastic.co/u/jackpark)\
**Post date:** [September 15, 2014, 1:58pm UTC](https://discuss.elastic.co/t/naive-question-about-multiple-clients/19789/1 "2014-09-15T13:58:26Z")

</div>

A really simple question is this: can more than one client be talking to an  
ES cluster at the same time? I ask because I notice that there is a lock  
file in a shard directory.

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV\_Jw%2BJ7VsTMWKt-PfTzKyBuyALT\_g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV_Jw%2BJ7VsTMWKt-PfTzKyBuyALT_g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 15, 2014, 2:22pm UTC](https://discuss.elastic.co/t/naive-question-about-multiple-clients/19789/2 "2014-09-15T14:22:06Z")

</div>

Yes. You can have many client talking to es cluster at the same time.  
Wondering if you are talking about Node Client here. Which is is basically a node running inside the cluster and which can provide access to Client features.

If you use Java Transport Client, I don't think any file is generated.  
If you use other language clients (PHP, Python, Perl…), I can't see that kind of file either.

About Java, note that it's a good idea to share the same Client across all threads. Java client is thread safe.

Hope this helps

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 15 septembre 2014 à 15:58:29, Jack Park (jackpark@topicquests.org) a écrit:

A really simple question is this: can more than one client be talking to an ES cluster at the same time? I ask because I notice that there is a lock file in a shard directory.

## Thanks!

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV\_Jw%2BJ7VsTMWKt-PfTzKyBuyALT\_g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV_Jw%2BJ7VsTMWKt-PfTzKyBuyALT_g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jackpark](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jackpark](https://discuss.elastic.co/u/jackpark)\
**Post date:** [September 15, 2014, 2:39pm UTC](https://discuss.elastic.co/t/naive-question-about-multiple-clients/19789/3 "2014-09-15T14:39:47Z")

</div>

Thanks!  
I have the system running under nodejs, but want to start a java client  
against the same cluster (right now, nodejs is talking to it over http: the  
java client wants to talk to it by way of embedded, though still over the  
localhost socket.

On Mon, Sep 15, 2014 at 7:22 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Yes. You can have many client talking to es cluster at the same time.  
> Wondering if you are talking about Node Client here. Which is is basically  
> a node running inside the cluster and which can provide access to Client  
> features.
> 
> If you use Java Transport Client, I don't think any file is generated.  
> If you use other language clients (PHP, Python, Perl…), I can't see that  
> kind of file either.
> 
> About Java, note that it's a good idea to share the same Client across all  
> threads. Java client is thread safe.
> 
> Hope this helps
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 15 septembre 2014 à 15:58:29, Jack Park ([jackpark@topicquests.org](mailto:jackpark@topicquests.org)) a  
> écrit:
> 
> A really simple question is this: can more than one client be talking to  
> an ES cluster at the same time? I ask because I notice that there is a  
> lock file in a shard directory.
> 
> ## Thanks!
> 
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV\_Jw%2BJ7VsTMWKt-PfTzKyBuyALT\_g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV_Jw%2BJ7VsTMWKt-PfTzKyBuyALT_g%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV\_Jw%2BJ7VsTMWKt-PfTzKyBuyALT\_g%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV_Jw%2BJ7VsTMWKt-PfTzKyBuyALT_g%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local)  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyFRN2yDA%2B%3DDdUkj5tJqhRSrOP65\_eSTeV5QJK5AV1ZcA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyFRN2yDA%2B%3DDdUkj5tJqhRSrOP65_eSTeV5QJK5AV1ZcA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 15, 2014, 2:56pm UTC](https://discuss.elastic.co/t/naive-question-about-multiple-clients/19789/4 "2014-09-15T14:56:24Z")

</div>

Why not using the JavaScript client?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 15 sept. 2014 à 16:39, Jack Park [jackpark@topicquests.org](mailto:jackpark@topicquests.org) a écrit :
> 
> Thanks!  
> I have the system running under nodejs, but want to start a java client against the same cluster (right now, nodejs is talking to it over http: the java client wants to talk to it by way of embedded, though still over the localhost socket.
> 
> > On Mon, Sep 15, 2014 at 7:22 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> > Yes. You can have many client talking to es cluster at the same time.  
> > Wondering if you are talking about Node Client here. Which is is basically a node running inside the cluster and which can provide access to Client features.
> > 
> > If you use Java Transport Client, I don't think any file is generated.  
> > If you use other language clients (PHP, Python, Perl…), I can't see that kind of file either.
> > 
> > About Java, note that it's a good idea to share the same Client across all threads. Java client is thread safe.
> > 
> > Hope this helps
> > 
> > --  
> > David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
> > @dadoonet | @elasticsearchfr
> > 
> > > Le 15 septembre 2014 à 15:58:29, Jack Park ([jackpark@topicquests.org](mailto:jackpark@topicquests.org)) a écrit:
> > > 
> > > A really simple question is this: can more than one client be talking to an ES cluster at the same time? I ask because I notice that there is a lock file in a shard directory.
> > > 
> > > ## Thanks!
> > > 
> > > You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV\_Jw%2BJ7VsTMWKt-PfTzKyBuyALT\_g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV_Jw%2BJ7VsTMWKt-PfTzKyBuyALT_g%40mail.gmail.com).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyFRN2yDA%2B%3DDdUkj5tJqhRSrOP65\_eSTeV5QJK5AV1ZcA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyFRN2yDA%2B%3DDdUkj5tJqhRSrOP65_eSTeV5QJK5AV1ZcA%40mail.gmail.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/D12FFA2C-3687-4DB7-9C6B-5C36F14D192B%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/D12FFA2C-3687-4DB7-9C6B-5C36F14D192B%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jackpark](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jackpark](https://discuss.elastic.co/u/jackpark)\
**Post date:** [September 15, 2014, 3:40pm UTC](https://discuss.elastic.co/t/naive-question-about-multiple-clients/19789/5 "2014-09-15T15:40:25Z")

</div>

Hi David,

I am not certain how to interpret your question. Here is the precise  
scenario:  
The node client is driving this website: [http://www.topicquests.org:3000/](http://www.topicquests.org:3000/)  
which is a very early-stage experiment in developing online collective  
intelligence tools, the theory behind which is sketched in these slides  
[Towards An Improvement Community Platform for Service Innovation | PPT](http://www.slideshare.net/jackpark/issip20140910)

But, this is all "topic map" based, which means that there are background  
agents running which are mostly Java/Scala/Clojure based. Those agents  
receive TCP-sent messages from the node-based server when a new topic is  
created; they then set about to study that new document and perform various  
processes on the index in the background.

Right now, my java ES client is giving me fits mostly associated with a  
migration from 0.90 to 1.2.2 , which Ill mention in a different thread.

On Mon, Sep 15, 2014 at 7:56 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Why not using the JavaScript client?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 sept. 2014 à 16:39, Jack Park [jackpark@topicquests.org](mailto:jackpark@topicquests.org) a écrit :
> 
> Thanks!  
> I have the system running under nodejs, but want to start a java client  
> against the same cluster (right now, nodejs is talking to it over http: the  
> java client wants to talk to it by way of embedded, though still over the  
> localhost socket.
> 
> On Mon, Sep 15, 2014 at 7:22 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > Yes. You can have many client talking to es cluster at the same time.  
> > Wondering if you are talking about Node Client here. Which is is  
> > basically a node running inside the cluster and which can provide access to  
> > Client features.
> > 
> > If you use Java Transport Client, I don't think any file is generated.  
> > If you use other language clients (PHP, Python, Perl…), I can't see that  
> > kind of file either.
> > 
> > About Java, note that it's a good idea to share the same Client across  
> > all threads. Java client is thread safe.
> > 
> > Hope this helps
> > 
> > --  
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)  
> > [http://Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> > [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 15 septembre 2014 à 15:58:29, Jack Park ([jackpark@topicquests.org](mailto:jackpark@topicquests.org)) a  
> > écrit:
> > 
> > A really simple question is this: can more than one client be talking to  
> > an ES cluster at the same time? I ask because I notice that there is a  
> > lock file in a shard directory.
> > 
> > ## Thanks!
> > 
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV\_Jw%2BJ7VsTMWKt-PfTzKyBuyALT\_g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV_Jw%2BJ7VsTMWKt-PfTzKyBuyALT_g%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV\_Jw%2BJ7VsTMWKt-PfTzKyBuyALT\_g%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fy%3DgQtfSNRdYxH7SV_Jw%2BJ7VsTMWKt-PfTzKyBuyALT_g%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local)  
> > [https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.5416f60e.77465f01.3c6%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyFRN2yDA%2B%3DDdUkj5tJqhRSrOP65\_eSTeV5QJK5AV1ZcA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyFRN2yDA%2B%3DDdUkj5tJqhRSrOP65_eSTeV5QJK5AV1ZcA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyFRN2yDA%2B%3DDdUkj5tJqhRSrOP65\_eSTeV5QJK5AV1ZcA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyFRN2yDA%2B%3DDdUkj5tJqhRSrOP65_eSTeV5QJK5AV1ZcA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/D12FFA2C-3687-4DB7-9C6B-5C36F14D192B%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/D12FFA2C-3687-4DB7-9C6B-5C36F14D192B%40pilato.fr)  
> [https://groups.google.com/d/msgid/elasticsearch/D12FFA2C-3687-4DB7-9C6B-5C36F14D192B%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/D12FFA2C-3687-4DB7-9C6B-5C36F14D192B%40pilato.fr?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyuEm0fxDHVRFr8cDftDpad\_L4LCbXXJAxcrwNSTQR4AA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyuEm0fxDHVRFr8cDftDpad_L4LCbXXJAxcrwNSTQR4AA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:02am UTC](https://discuss.elastic.co/t/naive-question-about-multiple-clients/19789/6 "2017-07-06T01:02:16Z")

</div>


