Skip to content

Commit 0f6239b

Browse files
authored
[C++] [userver] Increase DB connections count and bump userver commit (#7979)
* [C++] [userver] Increase DB connections count * bump userver version
1 parent c5d2088 commit 0f6239b

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ghcr.io/userver-framework/docker-userver-build-base:v1a AS builder
22
WORKDIR /src
33
RUN git clone https://github.com/userver-framework/userver.git && \
4-
cd userver && git checkout b69a8db23844d3abbb68e40a502eae0ecd2e4b62
4+
cd userver && git checkout 151bc1e3df01807da9cd27f9677b80f4951b1f25
55
COPY userver_benchmark/ ./
66
RUN mkdir build && cd build && \
77
cmake -DUSERVER_IS_THE_ROOT_PROJECT=0 -DUSERVER_OPEN_SOURCE_BUILD=1 -DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0 \

frameworks/C++/userver/userver.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ghcr.io/userver-framework/docker-userver-build-base:v1a AS builder
22
WORKDIR /src
33
RUN git clone https://github.com/userver-framework/userver.git && \
4-
cd userver && git checkout b69a8db23844d3abbb68e40a502eae0ecd2e4b62
4+
cd userver && git checkout 151bc1e3df01807da9cd27f9677b80f4951b1f25
55
COPY userver_benchmark/ ./
66
RUN mkdir build && cd build && \
77
cmake -DUSERVER_IS_THE_ROOT_PROJECT=0 -DUSERVER_OPEN_SOURCE_BUILD=1 -DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0 \

frameworks/C++/userver/userver_benchmark/userver_techempower.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
#include <userver/testsuite/testsuite_support.hpp>
33
#include <userver/utils/daemon_run.hpp>
44

5+
#include <userver/clients/dns/component.hpp>
6+
57
#include <userver/storages/postgres/component.hpp>
68
#include <userver/storages/secdist/component.hpp>
9+
#include <userver/storages/secdist/provider_component.hpp>
710

811
#include "controllers/cached_queries/handler.hpp"
912
#include "controllers/json/handler.hpp"
@@ -20,7 +23,9 @@ namespace userver_techempower {
2023
int Main(int argc, char* argv[]) {
2124
auto component_list =
2225
userver::components::MinimalServerComponentList()
26+
.Append<userver::clients::dns::Component>()
2327
.Append<userver::components::Secdist>()
28+
.Append<userver::components::DefaultSecdistProvider>()
2429
.Append<userver::components::TestsuiteSupport>()
2530
.Append<userver::components::Postgres>("hello-world-db")
2631
.Append<plaintext::Handler>()

frameworks/C++/userver/userver_configs/dynamic_config_fallback.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"USERVER_LRU_CACHES": {},
1010
"USERVER_RPS_CCONTROL_CUSTOM_STATUS": {},
1111
"USERVER_TASK_PROCESSOR_PROFILER_DEBUG": {},
12+
"USERVER_HANDLER_STREAM_API_ENABLED": false,
1213
"HTTP_CLIENT_CONNECTION_POOL_SIZE": 1000,
1314
"HTTP_CLIENT_CONNECT_THROTTLE": {
1415
"http-limit": 6000,
@@ -38,8 +39,8 @@
3839
"POSTGRES_CONNECTION_PIPELINE_ENABLED": false,
3940
"POSTGRES_CONNECTION_POOL_SETTINGS": {
4041
"hello_world": {
41-
"min_pool_size": 28,
42-
"max_pool_size": 28,
42+
"min_pool_size": 75,
43+
"max_pool_size": 100,
4344
"max_queue_size": 512
4445
}
4546
},

frameworks/C++/userver/userver_configs/static_config.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,18 @@ components_manager:
4343
tracer: # Component that helps to trace execution times and requests in logs.
4444
service-name: userver-techempower # "You know. You all know exactly who I am. Say my name. " (c)
4545

46+
dns-client:
47+
fs-task-processor: fs-task-processor
48+
4649
dynamic-config: # Dynamic config storage options, do nothing
4750
fs-cache-path: ''
4851
dynamic-config-fallbacks: # Load options from file and push them into the dynamic config storage.
4952
fallback-path: /app/dynamic_config_fallback.json
5053

5154
testsuite-support:
5255

53-
secdist: # Component that stores configuration of hosts and passwords
56+
secdist: {} # Component that stores configuration of hosts and passwords
57+
default-secdist-provider:
5458
config: /app/secure_data.json # Values are supposed to be stored in this file
5559
missing-ok: false # ... but if the file is missing it is still ok
5660

@@ -67,8 +71,8 @@ components_manager:
6771
hello-world-db:
6872
dbalias: hello_world
6973
blocking_task_processor: fs-task-processor
70-
min_pool_size: 28
71-
max_pool_size: 28
74+
min_pool_size: 75
75+
max_pool_size: 100
7276
max_queue_size: 512
7377

7478
single-query-handler:

0 commit comments

Comments
 (0)