diff --git a/mcrouter/CarbonRouterInstanceBase.h b/mcrouter/CarbonRouterInstanceBase.h index e378931df..47dbeca92 100644 --- a/mcrouter/CarbonRouterInstanceBase.h +++ b/mcrouter/CarbonRouterInstanceBase.h @@ -243,6 +243,16 @@ class CarbonRouterInstanceBase { axonProxyClientFactory_ = std::move(clientFactory); } + /** + * Runtime features that can be enabled from runtime_features block + * in routing config + */ + struct RuntimeFeatures { + std::atomic enableOdslScuba = false; + std::atomic enableOdslODS = false; + }; + RuntimeFeatures runtimeFeatures_; + protected: void resetMetadata() { metadata_.reset(); diff --git a/mcrouter/ProxyConfig-inl.h b/mcrouter/ProxyConfig-inl.h index 7d29259aa..861675b13 100644 --- a/mcrouter/ProxyConfig-inl.h +++ b/mcrouter/ProxyConfig-inl.h @@ -128,6 +128,11 @@ ProxyConfig::ProxyConfig( bool enableAsyncDlBroadcast = readBool("enable_async_dl_broadcast", false); + proxy.router().runtimeFeatures_.enableOdslScuba = + readBool("enable_odsl_scuba", false); + proxy.router().runtimeFeatures_.enableOdslODS = + readBool("enable_odsl_ods", false); + proxyRoute_ = std::make_shared>( proxy, routeSelectors,