# /// [Postgres service sample - static config]
# yaml
components_manager:
components: # Configuring components that were registered via component_list
handler-key-value:
path: /v1/key-value # Registering handler by URL '/v1/key-value'.
task_processor: main-task-processor # Run it on CPU bound task processor
method: GET,DELETE,POST
key-value-database:
dbconnection: 'postgresql://testsuite@localhost:15433/postgres'
blocking_task_processor: fs-task-processor
dns_resolver: async
dynamic-config: # Dynamic config storage options
defaults:
POSTGRES_CONNECTION_POOL_SETTINGS:
key-value-database:
max_pool_size: 15
max_queue_size: 200
min_pool_size: 8
POSTGRES_HANDLERS_COMMAND_CONTROL:
/v1/key-value:
DELETE:
network_timeout_ms: 500
statement_timeout_ms: 250
POSTGRES_QUERIES_COMMAND_CONTROL:
sample_select_value:
network_timeout_ms: 70
statement_timeout_ms: 40
sample_transaction_insert_key_value:
network_timeout_ms: 200
statement_timeout_ms: 150
POSTGRES_STATEMENT_METRICS_SETTINGS:
key-value-database:
max_statement_metrics: 5
server:
# ...
# /// [Postgres service sample - static config]
listener: # configuring the main listening socket...
port: 8087 # ...to listen on this port and...
task_processor: main-task-processor # ...process incoming requests on this task processor.
logging:
fs-task-processor: fs-task-processor
loggers:
default:
file_path: '@stderr'
level: debug
overflow_behavior: discard # Drop logs if the system is too busy to write them down.
dns-client:
fs-task-processor: fs-task-processor
testsuite-support:
task_processors: # Task processor is an executor for coroutine tasks
main-task-processor: # Make a task processor for CPU-bound coroutine tasks.
worker_threads: 4 # Process tasks in 4 threads.
fs-task-processor: # Make a separate task processor for filesystem bound tasks.
worker_threads: 4
default_task_processor: main-task-processor # Task processor in which components start.