[ovs-dev] RFC: OVN database options

Ben Pfaff blp at ovn.org
Thu Mar 10 23:50:49 UTC 2016


On Thu, Mar 10, 2016 at 12:52:43PM -0500, Russell Bryant wrote:
> On Thu, Mar 10, 2016 at 2:11 AM, Ben Pfaff <blp at ovn.org> wrote:
> 
> > Database       txn  ACID  consist  trk   HA   OS    C   Py  format
> > -------------  ---  ----  -------  ---  ---  ---  ---  ---  ------
> > ActorDB        yes  ACID   strong   NO  yes  yes  yes  yes     sql
> > Aerospike      yes  ACID   strong   NO  yes  yes  yes  yes   db/KV
> > Cassandra       NO  -C-D  tunable   NO  yes  yes   NO  yes   table
> > Cockroach DB   yes  ACID   strong   NO  yes  yes   ?    ?      sql
> > Couchbase       NO  ????     ????   NO  yes  NO?  yes  yes    JSON
> > CrateIO         NO  ????  EVNTUAL   NO  yes  yes   NO  yes     sql
> > etcd            NO  ACID   strong  yes? yes  yes  yes  yes      KV
> > Gigaspaces XAP yes  ACID   strong  yes  yes   NO   NO   NO   multi
> > HBase           NO  ACID   strong   NO  yes  yes   NO  yes   table
> > Hyperdex       yes  ACID   strong   NO  yes   NO  yes  yes      KV
> > Hypertable      NO  ????     ????   NO  yes  yes   NO  yes   table
> > MongoDB         NO  ACID   strong   ??  yes  yes  yes  yes    JSON
> > RAMCloud       yes  ????   strong   NO  yes  yes   NO  yes      KV
> > Redis          yes  -C?D     ????   NO  yes  yes  yes  yes      KV
> > Riak            NO  ---D  EVNTUAL   NO  yes  yes  yes  yes      KV
> > Scalaris       yes  ACI-   strong   NO  yes  yes   NO  yes      KV
> > ScyllaDB        NO  -C-D  tunable   NO  yes  yes   NO  yes   table
> > Voldemort       NO  ????  EVNTUAL   NO  yes  yes   NO  yes      KV
> > Zookeeper      yes  AC-D   strong  yes  yes  yes  yes  yes      KV
> >
> > OVSDB          yes  ACID   strong  yes   NO  yes  yes  yes   table
> >
> 
> I've shared this message with a few people that I work with that have more
> experience evaluating these things than I do to gather some feedback.
> 
> Julien Danjou offered the following alternative that I felt was worth
> adding to the conversation:
> 
> > Database       txn  ACID  consist  trk   HA   OS    C   Py  format
> > -------------  ---  ----  -------  ---  ---  ---  ---  ---  ------
> > PostgreSQL     yes  ACID   strong  yes  yes  yes  yes  yes     sql

I've been a fan of Postgres since I used in the 1990s for a web-based
application.  It didn't occur to me that it was appropriate here.
Julien, thanks so much for joining the discussion.

> > So yes, it has everything OVN needs. It can push notifications to
> > clients via the NOTIFY¹ command (that you can use in any
> > procedure/trigger). For example, you could imagine creating a trigger
> > that sends a JSON payload for each new update/insert in the database.
> > That's literally 10 lines of PL/SQL.

That's good to know.  I hadn't figured out how to do this kind of thing
with SQL-based systems.

> > ¹  http://www.postgresql.org/docs/9.5/static/sql-notify.html
> >
> > I think that PostgreSQL would be the safer bet in this move, as:
> > - building something on top of etcd would seem weak w.r.t your
> > schema/table requirements
> > - investing in OVSDB (though keep in mind I don't know it :-) would
> > probably end up in redoing a job PostgreSQL people already have done
> > better than you would ;-)
> >
> > The only questions that this raises to me are:
> > - whether PostgreSQL is too large/complex to deploy for OVN. Seeing the
> >   list of candidates that were evaluated, I wouldn't think so, but there
> >   can be a lot of different opinions on that based on different
> >   perception of PostgreSQL. And since you're targeting a network DB, you
> >   definitely need a daemon configured and set-up so I'm only partially
> >   worried here. :)
> 
> I wouldn't think so, but it sounds like I need to study the HA model.

OK, I added the entry and this note:

    - PostgreSQL.  Julien Danjou writes:

	HA can be done, though it requires probably a bit more manual
	work to be put in place.  This can automated in some way, but
	it's easy to do stream replication with a hot stand by server
	to recover.  Recent versions of PostgreSQL offer tools for
	that.

      (Looking at the PostgreSQL 9.4 manual, transaction log shipping
      with asynchronous transaction log streaming seems appropriate.)

      Julien continues:

	It can push notifications to clients via the NOTIFY¹ command
	(that you can use in any procedure/trigger). For example, you
	could imagine creating a trigger that sends a JSON payload for
	each new update/insert in the database.  That's literally 10
	lines of PL/SQL.

> Specific to the OVN+OpenStack use case, I imagine a frequent question would
> be, "why do I have to use MariaDB+Galera AND PostgreSQL in the same
> environment?!"  I suppose OpenStack works with PostgreSQL, too, and it's
> just a deployment choice that most people seem to be using MariaDB+Galera.
> 
> Further on that note, I take it MariaDB+Galera is lacking against these
> requirements?  Or should it be on this list?

MariaDB doesn't seem to have NOTIFY and related functionality, based on
documentation and web searches.

It does tick all the other boxes.  I added:

Database       txn  ACID  consist  trk   HA   OS    C   Py  format
-------------  ---  ----  -------  ---  ---  ---  ---  ---  ------
MariaDB        yes  ACID   strong   NO  yes  yes  yes  yes     sql



More information about the dev mailing list