Opening TransportClient connection per Index

I have a use case in which i want to create per index per account (assume
an account represents an user), all data belong to that user will be kept
in that index. My question is - what if we create connection per index and
keep it alive during the user session. So this means for 100 active users,
there will be 100 connections from TransportClient to ES Cluster. I don't
have a reason why I have 100 instances of TransportClient has to be
initialized and kept in memory. Not sure if a singleton would unnecessarily
bring thread locks.

Any help is greatly appreciated.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ce54bd4b-1c11-429a-8998-76482f051375%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You can enlarge thread pools in TransportClient, also Netty worker threads.
User session states should be managed in the front-end service (reverse
proxy or Java middleware e.g.) so it is still ok to use a singleton
TransportClient since it is stateless. It handles requests and the
corresponding responses.

If 100 users are active at the same time, resources might get low, so you
should think about ramping up a line of front-end services on more than one
machine to balance the front-end load.

Jörg

On Mon, Jul 7, 2014 at 5:45 PM, AsyncAwait vadivtk@gmail.com wrote:

I have a use case in which i want to create per index per account (assume
an account represents an user), all data belong to that user will be kept
in that index. My question is - what if we create connection per index and
keep it alive during the user session. So this means for 100 active users,
there will be 100 connections from TransportClient to ES Cluster. I don't
have a reason why I have 100 instances of TransportClient has to be
initialized and kept in memory. Not sure if a singleton would unnecessarily
bring thread locks.

Any help is greatly appreciated.

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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/ce54bd4b-1c11-429a-8998-76482f051375%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/ce54bd4b-1c11-429a-8998-76482f051375%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEjt3qCUWD_5rxv84XL8BYNMzy2dKsfsfr8j-017cNbow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.