summaryrefslogtreecommitdiff
path: root/ovsdb/ovsdb.h
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2021-06-01 23:27:36 +0200
committerIlya Maximets <i.maximets@ovn.org>2021-07-15 22:38:03 +0200
commit026c77c58ddba12ad81082ca27564ab9c33986bd (patch)
tree167899faf80cbea9dd7f65c25e5b09145f31acd8 /ovsdb/ovsdb.h
parentb4cef64c83469653f40d0cbe50a88c7b42c1f46d (diff)
downloadopenvswitch-026c77c58ddba12ad81082ca27564ab9c33986bd.tar.gz
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 <mark.d.gray@redhat.com> Acked-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ovsdb/ovsdb.h')
-rw-r--r--ovsdb/ovsdb.h3
1 files changed, 3 insertions, 0 deletions
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 *);