1
votes

We have been using the Datastax Python driver for connecting to Cassandra. Unfortunately, although we performed our tests with a newer version of Cassandra (which listens to both ports 9160 and 9042), our deployment instance is much older and listens to 9160 only. The current version of the driver (which we are using) uses the CQL protocol- the daemon for which listens on 9042.

Is there a way to use to Datastax driver to communicate using the Thrift protocol? Is downgrading to an earlier version (assuming older Datastax drivers used the Thrift protocol) a good idea?

Any help appreciated, thanks!

1

1 Answers

1
votes

The datastax drivers only support the CQL native protocol interface by design as thrift is considered deprecated. You can do CQL over thrift, but I would discourage that since you are going to get the worst of both worlds performance wise. The native transport (9042) is optimized to have many ongoing requests on a single connection, while thrift (9160) is a request-per-connection. There is going to be a small amount of overhead with CQL compared to thrift data model until C* 3.0 when the storage model changes, but the downside of that is compensated and more by using the native transport.

What I would recommend is looking into opening up the native protocol interface on your deployed cluster (if it's C* 1.2+ this should be doable), or upgrading if it doesn't support CQL 3. I would recommend against developing new solutions using thrift since cassandra is moving away from that. If you are stuck on thrift, I'd recommend looking at pycassa.