Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is best practice for sql4es only to use one ESConnection ? #27

Open
harryyu1018 opened this issue Dec 7, 2016 · 1 comment
Open

Is best practice for sql4es only to use one ESConnection ? #27

harryyu1018 opened this issue Dec 7, 2016 · 1 comment

Comments

@harryyu1018
Copy link

harryyu1018 commented Dec 7, 2016

We used the connection pool to create and maintain Connections when the database was MySQL, PostgreSQL, and Oracle. As this way, we thought to use pool to manage ESConnection. But when we reviewed code, we found that one ESConnection wrap one TransportClient instance. If we use the pool, there will be multiple TransportClient instances in project (one JVM). However, official suggests that one client in one JVM.

So what should we do? Use only one ESConnection instance or multiple ESConnection instances in a pool? thanks for your reply?

@mallim
Copy link
Contributor

mallim commented Sep 19, 2018

From the running of test cases against Elasticsearch 6.4.0, one ESConnection may spawn quite a number of threads by Elasticsearch which is using Apache Async HttpClient by default. Do take note if you want to use more than one connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants