# Jdbc input plugin connection pooling?

**URL:** <https://discuss.elastic.co/t/jdbc-input-plugin-connection-pooling/313915>\
**Category:** Logstash\
**Created:** [September 7, 2022, 5:16pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-connection-pooling/313915 "2022-09-07T17:16:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steevhise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steevhise/32/41458_2.png) [@steevhise](https://discuss.elastic.co/u/steevhise)\
**Post date:** [September 7, 2022, 5:16pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-connection-pooling/313915/1 "2022-09-07T17:16:37Z")

</div>

Is there a way to give logstash jdbc plugin several db servers (all replicas of same master) to connect to? Do you just provide an array of connection strings? or what?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [September 7, 2022, 6:50pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-connection-pooling/313915/2 "2022-09-07T18:50:44Z")

</div>

> [@steevhise](#):
>
> Do you just provide an array of connection strings?

No, the connection string is [validated](https://github.com/logstash-plugins/logstash-input-jdbc/blob/878a73eb67b68366fac74fcc65e9cadd6cf44766/lib/logstash/plugin_mixins/jdbc/jdbc.rb#L39) as a string, not an array.

The jdbc input is a wrapper around the jdbc mixin, which is a wrapper around Jermey Evans' [sequel](https://github.com/jeremyevans/sequel) toolkit. That has adapters for several oft-used databases. If the adapter (effectively the underlying DB vendor's API) supports multiple host names in a single connection string then it may be possible.

---

<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:** [October 5, 2022, 6:51pm UTC](https://discuss.elastic.co/t/jdbc-input-plugin-connection-pooling/313915/3 "2022-10-05T18:51:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
