[ovs-dev] RFC: OVN database options
Russell Bryant
russell at ovn.org
Thu Mar 10 17:52:43 UTC 2016
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
>
> PostgreSQL is way more powerful than most people know, and I think it
> offers all the features you need:
>
> - Size: not an issue, it can handle terabytes and you only seem to need
> a few hundred of megabytes
> - Scale: not an issue too, can handle thousands of connection per
> seconds
> - Performance: again, not an issue, can handle very large amounts of it
> - Transactions: yup
> - HA: this 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.
> - Open source, as you know :)
> - C client
> - Python client (psycopg2 is pretty good, used it a lot)
> - Table obviously
> - Schema but you know it
> - Network, amirite?
> - Easy to have a lot of read-only replicas
>
> 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.
>
> ¹ 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.
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?
> - if the HA model(s) provided by PostgreSQL can fit the requirement of
> OVN. I would think so, but I'm not sure on how exactly OVN is on the
> scale of "resilient vs integrity".
Based on this info, PostgreSQL sounds worth a close look. (Thanks, Julien!)
--
Russell Bryant
More information about the dev
mailing list