-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.yaml
170 lines (157 loc) · 6.96 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Copyright (C) 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
cassandra_to_spanner_configs:
# [Optional] Global default GCP Project ID
projectId: YOUR_PROJECT_ID
# [Optional] Global default configuration table name
configTableName: YOUR_CONFIG_TABLE_NAME
# If True, proxy will flatten out {keyspace}_{table_name} as the
# table name. Otherwise, original table name will be preserved
# as-is. Default to False
keyspaceFlatter: True
# useRowTTL: If set to True, the "spanner_ttl_ts" column will be included in all queries
# (insert, select, update). If set to False, the "spanner_ttl_ts" column will be ignored
# and excluded from all query types. Default is False.
useRowTTL: True
# useRowTimestamp: If set to True, the "last_commit_ts" column will be included in
# all queries (insert, select, update). If set to False, the "last_commit_ts" column
# will be excluded from all query types. Default is False.
useRowTimestamp: True
listeners:
- name: YOUR_CLUSTER_NAME
port: PORT
spanner:
# [Optional], skip if it is the same as global GCP Project ID
projectId: YOUR_PROJECT_ID
# Spanner Instance ID
instanceId: YOUR_SPANNER_INSTANCE_ID
# Spanner Database ID
databaseId: YOUR_SPANNER_DATABASE
# [Optional] - Global else default to TableConfigurations
configTableName: TableConfigurations
# Spanner Connection Pool Settings
Session:
# Minimum number of sessions that Spanner pool will always maintain by the session pool.
# Defaults to 100.
min: 100
# Maximum number of sessions that Spanner pool will have.
# Defaults to 400.
max: 200
# Number of channels utilized by the Spanner client.
# Defaults to 4.
grpcChannels: 4
# Spanner read/write operation settings
Operation:
# This is the amount of latency this request is willing to incur in order
# to improve throughput. If this field is not set, Spanner assumes requests
# are relatively latency sensitive and automatically determines an appropriate
# delay time. You can specify a commit delay value between 0 and 500 ms.
maxCommitDelay: 100
# With this option, Apply may attempt to apply mutations (Insert/Delete/Update)
# more than once; if the mutations are not idempotent, this may lead to a
# failure being reported when the mutation was applied more than once.
# When enabled, replay protection may require an additional RPC.
# So this option may be appropriate for latency sensitive and/or high throughput blind writing.
replayProtection: False
- name: YOUR_CLUSTER_NAME
port: PORT
spanner:
instanceId: YOUR_SPANNER_INSTANCE_ID
databaseId: YOUR_SPANNER_DATABASE
Session:
grpcChannels: 4
otel:
# Whether or not to enable OTEL.
# Defaults to False.
disabled: True
- name: YOUR_CLUSTER_NAME
port: PORT
spanner:
# Optional, skip if it is the same as global GCP Project ID
projectId: YOUR_PROJECT_ID
instanceId: YOUR_SPANNER_INSTANCE_ID
databaseId: YOUR_SPANNER_DATABASE
Session:
# Minimum number of sessions that Spanner pool will always
# maintain. Defaults to 100.
min: 100
# Number of channels utilized by the Spanner client.
# Defaults to 4.
grpcChannels: 4
- name: YOUR_CLUSTER_NAME
port: PORT
spanner:
# Optional, skip if it is the same as global GCP Project ID.
projectId: YOUR_PROJECT_ID
instanceId: YOUR_SPANNER_INSTANCE_ID
databaseId: YOUR_SPANNER_DATABASE
Session:
# Minimum number of sessions that Spanner pool will always
# maintain. Defaults to 100.
min: 100
# Maximum number of sessions that Spanner pool will have.
# Defaults to 400.
max: 200
# Number of channels utilized by the Spanner client.
# Defaults to 4.
grpcChannels: 4
otel:
# Set enabled to true or false for OTEL metrics and traces
enabled: True
# Whether or not to enable client side metrics (such as sessions, gfe latency etc.)
enabledClientSideMetrics: False
# Name of the collector service to be setup as a sidecar
serviceName: YOUR_OTEL_COLLECTOR_SERVICE_NAME
healthcheck:
# Enable the health check in this proxy application config only if the
# "health_check" extension is added to the OTEL collector service configuration.
#
# Recommendation:
# Enable the OTEL health check if you need to verify the collector's availability
# at the start of the application. For development or testing environments, it can
# be safely disabled to reduce complexity.
# Enable/Disable Health Check for OTEL, Default 'False'.
enabled: False
# Health check endpoint for the OTEL collector service
endpoint: YOUR_OTEL_COLLECTOR_HEALTHCHECK_ENDPOINT
metrics:
# Collector service endpoint
endpoint: YOUR_OTEL_COLLECTOR_SERVICE_ENDPOINT
traces:
# Collector service endpoint
endpoint: YOUR_OTEL_COLLECTOR_SERVICE_ENDPOINT
#Sampling ratio should be between 0 and 1. Here 0.05 means 5/100 Sampling ratio.
samplingRatio: YOUR_SAMPLING_RATIO
loggerConfig:
# Specifies the type of output, here it is set to 'file' indicating logs will be written to a file.
# Value of `outputType` should be `file` for file type or `stdout` for standard output.
# Default value is `stdout`.
outputType: YOUR_LOG_OUTPUT_TYPE
# Set this only if the outputType is set to `file`.
# The path and name of the log file where logs will be stored. For example, output.log, Required Key.
# Default `/var/log/cassandra-to-spanner-proxy/output.log`.
fileName: YOUR_LOG_OUTPUT_PATH
# Set this only if the outputType is set to `file`.
# The maximum size of the log file in megabytes before it is rotated. For example, 500 for 500 MB. Default 100MB
maxSize: MAX_LOG_FILE_SIZE
# Set this only if the outputType is set to `file`.
# The maximum number of backup log files to keep. Once this limit is reached, the oldest log file will be deleted. Default '10'.
maxBackups: MAX_LOG_FILE_BACKUPS
# Set this only if the outputType is set to `file`.
# The maximum age in days for a log file to be retained. Logs older than this will be deleted. Required Key.
# Default 3 days
maxAge: MAX_LOG_FILE_AGE
# Set this only if the outputType is set to `file`.
# Default value is set to 'False'. Change the value to 'True' for compressing the log files.
compress: True