From 026c77c58ddba12ad81082ca27564ab9c33986bd Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Tue, 1 Jun 2021 23:27:36 +0200 Subject: ovsdb: New ovsdb 'relay' service model. New database service model 'relay' that is needed to scale out read-mostly database access, e.g. ovn-controller connections to OVN_Southbound. In this service model ovsdb-server connects to existing OVSDB server and maintains in-memory copy of the database. It serves read-only transactions and monitor requests by its own, but forwards write transactions to the relay source. Key differences from the active-backup replication: - support for "write" transactions (next commit). - no on-disk storage. (probably, faster operation) - support for multiple remotes (connect to the clustered db). - doesn't try to keep connection as long as possible, but faster reconnects to other remotes to avoid missing updates. - No need to know the complete database schema beforehand, only the schema name. - can be used along with other standalone and clustered databases by the same ovsdb-server process. (doesn't turn the whole jsonrpc server to read-only mode) - supports modern version of monitors (monitor_cond_since), because based on ovsdb-cs. - could be chained, i.e. multiple relays could be connected one to another in a row or in a tree-like form. - doesn't increase availability. - cannot be converted to other service models or become a main active server. Some performance test results can be found here: https://mail.openvswitch.org/pipermail/ovs-dev/2021-July/385825.html Acked-by: Mark D. Gray Acked-by: Dumitru Ceara Signed-off-by: Ilya Maximets --- ovsdb/ovsdb.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ovsdb/ovsdb.h') diff --git a/ovsdb/ovsdb.h b/ovsdb/ovsdb.h index 72e127c84..16bd5f5ec 100644 --- a/ovsdb/ovsdb.h +++ b/ovsdb/ovsdb.h @@ -91,6 +91,9 @@ struct ovsdb { bool need_txn_history; /* Need to maintain history of transactions. */ unsigned int n_txn_history; /* Current number of history transactions. */ struct ovs_list txn_history; /* Contains "struct ovsdb_txn_history_node. */ + + /* Relay mode. */ + bool is_relay; }; struct ovsdb *ovsdb_create(struct ovsdb_schema *, struct ovsdb_storage *); -- cgit v1.2.1