Open dsmithson opened 7 years ago
Hi @dsmithson, thank you for your feedback! I started discussing this issue with Crate.
Our goal is to get support for CrateDB into the official npgsql as soon as possible and there is already an issue for multiple hosts in connectionstrings in Milestone 3.3 of the official npgsql project. (https://github.com/npgsql/npgsql/issues/732)
I´ll keep you updated about where the discussion goes.
hi, is this support now available in the cratedb-npgsql? I could see some commits in the official npgsql to provide multiple hosts support in the connection string. Interestingly, the Elasticsearch .net providers support this feature and reflect the server side Master election/changes efficiently in the client connection.
I have forked this project, adding 'basic' support for the multiple crate hosts in the connection string. Will send you pull request upon commit. Pl let me know if any of you working on this already so I can avoid redundant work :+1:
Hi @diwakarpp, we will soon merge the branch https://github.com/crate/crate-npgsql/tree/a/adapttypemappings into dev and the branch https://github.com/crate/npgsql/tree/a/typemappings into crate-dev. Before that, we will integrate the latest commits from official npgsql.
Hi @apircher , thank you very much for the details. Ok, then I will await the merge from the official npgsql. Pl let me know if you/your team need any help for the merge or tests after the merge. Cheers.
Since we're connecting to a cluster of Crate servers, it would be nice to specify a list of hosts to be used by the pool. Is it possible to specify multiple hosts in the connection string?
Some benefits of supporting multiple host connections:
Even distribution of queries against host endpoints
Redundant connections to the cluster to prevent outages in the scenario where a single host becomes unavailable