crate / sqlalchemy-cratedb

SQLAlchemy dialect for CrateDB.
https://cratedb.com/docs/sqlalchemy-cratedb/
Apache License 2.0
3 stars 2 forks source link

Using multiple servers/endpoints #146

Open amotl opened 3 months ago

amotl commented 3 months ago

Hi there,

@SchabiDesigns reported a possible flaw over at Python crate using multiple cursors parallel. Thanks.

connection.connection.dbapi_connection.client.active_servers apparently only includes a single element. Specifically, it is the first server configured.

With kind regards, Andreas.

amotl commented 3 months ago

Thinking about it, I am not sure if and how the SQLAlchemy driver interface can process multiple hosts, and if the CrateDB dialect is properly prepared to handle that right, if at all.

seut commented 3 months ago

I'm not sure if it is really worth to support multiple servers. Even if crate-python supports this, it's more a poor-man round-robin solution and in production I'd really recommend the use of a real load-balancer. So maybe let's remove the support for multiple servers instead?

amotl commented 3 months ago

Thanks. @SchabiDesigns is also asking about the same thing:

→ I think I will go for a load balancer and use that as entry point for the cluster. Do you have a recommendation?

/cc @WalBeh, @hlcianfagna