-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig.yaml
121 lines (109 loc) · 4.22 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Network settings for the proxy.
network:
# Tuple of an IP address with port for HTTP listener to bind on.
# Note that binding on `::` will bind on `0.0.0.0` too as long as
# the `net.ipv6.bindv6only` sysctl is set to 0 (default).
addr: ["::1", 8080]
# Limit for the queue of incoming connections.
backlog: 1024
# Number of worker threads.
# The proxy uses main thread for accepting connections and `threads` threads
# for serving requests.
# Can be omitted, meaning that the number of CPUs of the current machine should be utilized.
threads: 24
# Monitoring server settings.
# The monitoring server consumes one additional thread for serving requests.
monitoring:
addr: ["::1", 10000]
# Locator endpoints.
# These are passed directly into the cocaine-framework for service resolution.
# We also assume that all of these locator(s) are identical, i.e. connected to
# a single discovery component.
locators:
- ["::", 10053]
# Logging settings. All logs are written directly into the logging service.
# Omit this section to disable logging into the Cocaine.
# Each logger is managed in a separate thread (even if their names are equal),
# to be able to write all events asynchronously without blocking.
logging:
# Common logging section.
common:
# Service name into which all logging will be redirected.
name: logging
# Source field for logging service.
source: proxy/common
# Severity filter. Logging events with severity less than specified will
# be dropped. Allowed values are: [debug, info, warn, error].
severity: debug
# Access logging section.
# Here will be written request-associated events, like "request finished".
access:
# Service name into which all access logs will be written.
name: logging-access
# Source field for logging service.
source: proxy/access
# Severity filter.
severity: warn
# Name of the unified configuration service that is used for fine-grained
# cluster-wide configuration, like tracing, worker timeouts etc.
unicorn: unicorn
# Tracing settings.
# The HTTP proxy uses Unicorn service for obtaining tracing probabilities
# and performs subscriptions for updates.
tracing:
# Path to the Unicorn node, which contains tracing settings.
path: /tracing
# HTTP header, which transports a trace id value.
# If the header is absent a proxy will generate a random 64-bit value.
header: X-Request-Id
# Default deep-tracing probability.
# If triggered, a special `trace_bit` attribute will be set to all requests.
# Usually that means that all logs during the tracing path will be written,
# even debug logs.
probability: 0.01
# HTTP headers forwarding.
# Specified headers will be transformed and passed into the invocation event.
# Their values remain unchanged.
# Note, that HTTP headers are case-insensitive, thus we can detect both cases.
headers:
authorization: authorization
# Response timeout in seconds after which it will be canceled and the server
# responds with 504 HTTP status code.
timeout: 30
# Fine-grained service timeouts settings.
timeouts:
# Path to the Unicorn node, which contains timeouts settings.
path: /timeouts
# Service pool settings.
pool:
# Default pool limit for services.
limit: 5
# Default service life span in seconds after which it will become a candidate
# for reconnection.
lifespan: 60
# Fraction of a pool that can be in reconnection state simultaneously. Must
# be a float value between [0; 1]. A value of 0 means that the reconnection
# mechanism is disabled.
# For example we have a pool of 10 services and the ratio of 0.31,
# then 10 * 0.31 = 3.1 -> 4 services can be reconnected simultaneously.
reconnection_ratio: 0.4
# Fine-grained settings. These are the same as above, but applies only for
# specified services.
services:
echo:
limit: 4
# Optional load testing plugin.
# When activated, adds a terminal route to the end of routing list, which
# accepts all requests and performs request to the Geobase service. Used mainly
# for performance measuring.
# May be completely omitted.
load_testing:
enabled: false
# Authorization settings.
auth:
# Authorization service name.
service: tvm
# Client identifier.
client_id: 200
# Client secret to exchange for a token.
client_secret: <...>