[openstack-dev] [Keystone] Cockroachdb for Keystone Multi-master
mbayer at redhat.com
Fri May 19 21:31:16 UTC 2017
On 05/18/2017 06:13 PM, Adrian Turjak wrote:
> So, specifically in the realm of Keystone, since we are using sqlalchemy
> we already have Postgresql support, and since Cockroachdb does talk
> Postgres it shouldn't be too hard to back Keystone with it. At that
> stage you have a Keystone DB that could be multi-region, multi-master,
> consistent, and mostly impervious to disaster. Is that not the holy
> grail for a service like Keystone? Combine that with fernet tokens and
> suddenly Keystone becomes a service you can't really kill, and can
> mostly forget about.
So this is exhibit A for why I think keeping some level of "this might
need to work on other databases" within a codebase is always a great
idea even if you are not actively supporting other DBs at the moment.
Even if Openstack dumped Postgresql completely, I'd not take the
rudimental PG-related utilities out of oslo.db nor would I rename all
the "mysql_XYZ" facilities to be "XYZ".
Cockroachdb advertises SQLAlchemy compatibility very prominently. While
their tutorial at
says it uses psycopg2 as the database driver, they have implemented
their own "cockroachdb://" dialect on top of it, which likely smooths
out the SQL dialect and connectivity quirks between real Postgresql and
This is not the first "distributed database" to build on the Postgresql
protocol, I did a bunch of work for a database that started out called
"Akiban", then got merged to "FoundationDB", and then sadly was sucked
into a black hole shaped like a huge Apple and the entire product and
staff were gone forever. CockroachDB seems to be filling in that same
hole that I was hoping FoundationDB was going to do (until they fell
into said hole).
> I'm welcome to being called mad, but I am curious if anyone has looked
> at this. I'm likely to do some tests at some stage regarding this,
> because I'm hoping this is the solution I've been hoping to find for
> quite a long time.
I'd have a blast if Keystone wanted to get into this. Distributed /
NewSQL is something I have a lot of optimism about. Please keep me
> Further reading:
> - Adrian Turjak
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
More information about the OpenStack-dev