8000 Fix cluster-internal network protocol to HTTP/1 (#14749) · arangodb/arangodb@8730e36 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8730e36

Browse files
authored
Fix cluster-internal network protocol to HTTP/1 (#14749)
1 parent 2d6b0e1 commit 8730e36

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
devel
22
-----
33

4+
* Fix cluster-internal network protocol to HTTP/1 for now. Any other protocol
5+
selected via the startup option `--network.protocol` will automatically be
6+
switched to HTTP/1. The startup option `--network.protocol` is now deprecated
7+
and hidden by default. It will be removed in a future version of arangod.
8+
The rationale for this change is to move towards a single protocol for
9+
cluster-internal communication instead of 3 different ones.
10+
411
* Disable RTTI when compiling Snappy. RTTI used to be disabled previously,
512
up until some Merkle tree improvement PR was merged about one month ago,
613
which turned on RTTI for compiling Snappy.

arangod/Network/NetworkFeature.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,12 @@ void NetworkFeature::collectOptions(std::shared_ptr<options::ProgramOptions> opt
133133
std::unordered_set<std::string> protos = {
134134
"", "http", "http2", "h2", "vst"};
135135

136+
// starting with 3.9, we will hard-code the protocol for cluster-internal communication
136137
options->addOption("--network.protocol", "network protocol to use for cluster-internal communication",
137-
new DiscreteValuesParameter<StringParameter>(&_protocol, protos))
138-
.setIntroducedIn(30700);
138+
new DiscreteValuesParameter<StringParameter>(&_protocol, protos),
139+
options::makeDefaultFlags(options::Flags::Hidden))
140+
.setIntroducedIn(30700)
141+
.setDeprecatedIn(30900);
139142

140143
options
141144
->addOption("--network.max-requests-in-flight",
@@ -182,6 +185,11 @@ void NetworkFeature::prepare() {
182185
config.clusterInfo = ci;
183186
config.name = "ClusterComm";
184187

188+
// using an internal network protocol other than HTTP/1 is
189+
// not supported since 3.9. the protocol is always hard-coded
190+
// to HTTP/1 from now on.
191+
// note: we plan to upgrade the internal protocol to HTTP/2 at
192+
// some point in the future
185193
config.protocol = fuerte::ProtocolType::Http;
186194
if (_protocol == "http" || _protocol == "h1") {
187195
config.protocol = fuerte::ProtocolType::Http;
@@ -191,6 +199,13 @@ void NetworkFeature::prepare() {
191199
config.protocol = fuerte::ProtocolType::Vst;
192200
}
193201

202+
if (config.protocol != fuerte::ProtocolType::Http) {
203+
LOG_TOPIC("6d221", WARN, Logger::CONFIG)
204+
<< "using `--network.protocol` is deprecated. "
205+
<< "the network protocol for cluster-internal requests is hard-coded to HTTP/1 in this version";
206+
config.protocol = fuerte::ProtocolType::Http;
207+
}
208+
194209
_pool = std::make_unique<network::ConnectionPool>(config);
195210
_poolPtr.store(_pool.get(), std::memory_order_relaxed);
196211

0 commit comments

Comments
 (0)
0