Browse Source

[C++] [userver] Increase DB connections count and bump userver commit (#7979)

* [C++] [userver] Increase DB connections count

* bump userver version
itrofimow 2 years ago
parent
commit
0f6239bb30

+ 1 - 1
frameworks/C++/userver/userver-bare.dockerfile

@@ -1,7 +1,7 @@
 FROM ghcr.io/userver-framework/docker-userver-build-base:v1a AS builder
 FROM ghcr.io/userver-framework/docker-userver-build-base:v1a AS builder
 WORKDIR /src
 WORKDIR /src
 RUN git clone https://github.com/userver-framework/userver.git && \
 RUN git clone https://github.com/userver-framework/userver.git && \
-    cd userver && git checkout b69a8db23844d3abbb68e40a502eae0ecd2e4b62
+    cd userver && git checkout 151bc1e3df01807da9cd27f9677b80f4951b1f25
 COPY userver_benchmark/ ./
 COPY userver_benchmark/ ./
 RUN mkdir build && cd build && \
 RUN mkdir build && cd build && \
     cmake -DUSERVER_IS_THE_ROOT_PROJECT=0 -DUSERVER_OPEN_SOURCE_BUILD=1 -DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0 \
     cmake -DUSERVER_IS_THE_ROOT_PROJECT=0 -DUSERVER_OPEN_SOURCE_BUILD=1 -DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0 \

+ 1 - 1
frameworks/C++/userver/userver.dockerfile

@@ -1,7 +1,7 @@
 FROM ghcr.io/userver-framework/docker-userver-build-base:v1a AS builder
 FROM ghcr.io/userver-framework/docker-userver-build-base:v1a AS builder
 WORKDIR /src
 WORKDIR /src
 RUN git clone https://github.com/userver-framework/userver.git && \
 RUN git clone https://github.com/userver-framework/userver.git && \
-    cd userver && git checkout b69a8db23844d3abbb68e40a502eae0ecd2e4b62
+    cd userver && git checkout 151bc1e3df01807da9cd27f9677b80f4951b1f25
 COPY userver_benchmark/ ./
 COPY userver_benchmark/ ./
 RUN mkdir build && cd build && \
 RUN mkdir build && cd build && \
     cmake -DUSERVER_IS_THE_ROOT_PROJECT=0 -DUSERVER_OPEN_SOURCE_BUILD=1 -DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0 \
     cmake -DUSERVER_IS_THE_ROOT_PROJECT=0 -DUSERVER_OPEN_SOURCE_BUILD=1 -DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0 \

+ 5 - 0
frameworks/C++/userver/userver_benchmark/userver_techempower.cpp

@@ -2,8 +2,11 @@
 #include <userver/testsuite/testsuite_support.hpp>
 #include <userver/testsuite/testsuite_support.hpp>
 #include <userver/utils/daemon_run.hpp>
 #include <userver/utils/daemon_run.hpp>
 
 
+#include <userver/clients/dns/component.hpp>
+
 #include <userver/storages/postgres/component.hpp>
 #include <userver/storages/postgres/component.hpp>
 #include <userver/storages/secdist/component.hpp>
 #include <userver/storages/secdist/component.hpp>
+#include <userver/storages/secdist/provider_component.hpp>
 
 
 #include "controllers/cached_queries/handler.hpp"
 #include "controllers/cached_queries/handler.hpp"
 #include "controllers/json/handler.hpp"
 #include "controllers/json/handler.hpp"
@@ -20,7 +23,9 @@ namespace userver_techempower {
 int Main(int argc, char* argv[]) {
 int Main(int argc, char* argv[]) {
   auto component_list =
   auto component_list =
       userver::components::MinimalServerComponentList()
       userver::components::MinimalServerComponentList()
+          .Append<userver::clients::dns::Component>()
           .Append<userver::components::Secdist>()
           .Append<userver::components::Secdist>()
+          .Append<userver::components::DefaultSecdistProvider>()
           .Append<userver::components::TestsuiteSupport>()
           .Append<userver::components::TestsuiteSupport>()
           .Append<userver::components::Postgres>("hello-world-db")
           .Append<userver::components::Postgres>("hello-world-db")
           .Append<plaintext::Handler>()
           .Append<plaintext::Handler>()

+ 3 - 2
frameworks/C++/userver/userver_configs/dynamic_config_fallback.json

@@ -9,6 +9,7 @@
   "USERVER_LRU_CACHES": {},
   "USERVER_LRU_CACHES": {},
   "USERVER_RPS_CCONTROL_CUSTOM_STATUS": {},
   "USERVER_RPS_CCONTROL_CUSTOM_STATUS": {},
   "USERVER_TASK_PROCESSOR_PROFILER_DEBUG": {},
   "USERVER_TASK_PROCESSOR_PROFILER_DEBUG": {},
+  "USERVER_HANDLER_STREAM_API_ENABLED": false,
   "HTTP_CLIENT_CONNECTION_POOL_SIZE": 1000,
   "HTTP_CLIENT_CONNECTION_POOL_SIZE": 1000,
   "HTTP_CLIENT_CONNECT_THROTTLE": {
   "HTTP_CLIENT_CONNECT_THROTTLE": {
     "http-limit": 6000,
     "http-limit": 6000,
@@ -38,8 +39,8 @@
   "POSTGRES_CONNECTION_PIPELINE_ENABLED": false,
   "POSTGRES_CONNECTION_PIPELINE_ENABLED": false,
   "POSTGRES_CONNECTION_POOL_SETTINGS": {
   "POSTGRES_CONNECTION_POOL_SETTINGS": {
     "hello_world": {
     "hello_world": {
-      "min_pool_size": 28,
-      "max_pool_size": 28,
+      "min_pool_size": 75,
+      "max_pool_size": 100,
       "max_queue_size": 512
       "max_queue_size": 512
     }
     }
   },
   },

+ 7 - 3
frameworks/C++/userver/userver_configs/static_config.yaml

@@ -43,6 +43,9 @@ components_manager:
         tracer:                                 # Component that helps to trace execution times and requests in logs.
         tracer:                                 # Component that helps to trace execution times and requests in logs.
             service-name: userver-techempower   # "You know. You all know exactly who I am. Say my name. " (c)
             service-name: userver-techempower   # "You know. You all know exactly who I am. Say my name. " (c)
 
 
+        dns-client:
+            fs-task-processor: fs-task-processor
+
         dynamic-config:                      # Dynamic config storage options, do nothing
         dynamic-config:                      # Dynamic config storage options, do nothing
             fs-cache-path: ''
             fs-cache-path: ''
         dynamic-config-fallbacks:            # Load options from file and push them into the dynamic config storage.
         dynamic-config-fallbacks:            # Load options from file and push them into the dynamic config storage.
@@ -50,7 +53,8 @@ components_manager:
 
 
         testsuite-support:
         testsuite-support:
 
 
-        secdist: # Component that stores configuration of hosts and passwords
+        secdist: {} # Component that stores configuration of hosts and passwords
+        default-secdist-provider:
             config: /app/secure_data.json  # Values are supposed to be stored in this file
             config: /app/secure_data.json  # Values are supposed to be stored in this file
             missing-ok: false                             # ... but if the file is missing it is still ok
             missing-ok: false                             # ... but if the file is missing it is still ok
 
 
@@ -67,8 +71,8 @@ components_manager:
         hello-world-db:
         hello-world-db:
             dbalias: hello_world
             dbalias: hello_world
             blocking_task_processor: fs-task-processor
             blocking_task_processor: fs-task-processor
-            min_pool_size: 28
-            max_pool_size: 28
+            min_pool_size: 75
+            max_pool_size: 100
             max_queue_size: 512
             max_queue_size: 512
 
 
         single-query-handler:
         single-query-handler: