|
| 1 | +# License Key |
| 2 | + |
| 3 | +Required license key. |
| 4 | +`mlrd -license` to print all active licenses, or get licenses at https://mlrd.app. |
| 5 | + |
| 6 | +# DynamoDB Table |
| 7 | + |
| 8 | +`table_name` sets the DynamoDB table name that clients use. |
| 9 | +This setting is always required. |
| 10 | + |
| 11 | +The table name must be or match the common table name in the [table envs]({{ref . "table-envs" }}) for the license. |
| 12 | + |
| 13 | +**Values shown are only examples.** |
| 14 | + |
| 15 | +# Primary Key |
| 16 | + |
| 17 | +Primary key definition: required `partition_key` and optional `sort_key`. |
| 18 | + |
| 19 | +Values are coded attributes: "<type>,<attribute>". |
| 20 | +For example: |
| 21 | +* "S,Artist" |
| 22 | +* "N,Year" |
| 23 | +* "B,Checksum" |
| 24 | + |
| 25 | +If the primary key is not defined and the table mode is transparent or migration, mlrd auto-defines the table by calling `DescribeTable`. |
| 26 | +In SQL table mode, the primary key (and secondary indexes) must be defined. |
| 27 | + |
| 28 | +# Secondary Indexes |
| 29 | + |
| 30 | +Optional map of secondary indexes (GSI and LSI). |
| 31 | + |
| 32 | +* Map key: case-sensitive index name |
| 33 | +* Map fields are shown with example values |
| 34 | + |
| 35 | +`include` is a list of attributes to project with the secondary index. |
| 36 | + |
| 37 | +# AWS |
| 38 | + |
| 39 | +Configures AWS access to DynamoDB. |
| 40 | + |
| 41 | +By default (no values), the AWS SDK uses its defaults: |
| 42 | +* Env variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, etc. |
| 43 | +* Shared configuration files |
| 44 | +* Shared credentials files |
| 45 | + |
| 46 | +For security, mlrd does not accept AWS access key values in the table config. |
| 47 | +Best practice is to use AWS SDK defaults. |
| 48 | + |
| 49 | +# Migration Step |
| 50 | + |
| 51 | +Sets migration step, runs table in migration mode. |
| 52 | +See [migration overview]({{ref . "overview" }}). |
| 53 | + |
| 54 | +# MySQL |
| 55 | + |
| 56 | +MySQL connection and credential settings. |
| 57 | + |
| 58 | +If `hostname` and `socket` are not set, mlrd auto-detects a local MySQL socket; if that fails, it defaults to `host: 127.0.0.1:3306`. |
| 59 | +For consistency and clarity, set `socket` or `hostname`. |
| 60 | +If both are set, `socket` takes precedence. |
| 61 | + |
| 62 | +MySQL password source: one of `password`, `password_file`, `iam_auth`, or `password_secret` must be set and non-empty. |
| 63 | +mlrd supports online password rotation: password source is reloaded if MySQL returns an auth error; no need to restart mlrd. |
| 64 | + |
| 65 | +`table_name` defaults to `ddb.table_name`. |
| 66 | +This settings allows for a different MySQL table name. |
| 67 | +Clients always reference table by `ddb.table_name`. |
| 68 | + |
| 69 | +Other settings (`max_conn`, `storage`, etc.) are low-level and shouldn't be changed without consulting with mlrd.tech first. |
| 70 | + |
| 71 | +`sharded` affects how BatchGetItem and BatchWriteItem work. |
| 72 | +If false (default), SQL queries are optimized to run on a single node. |
| 73 | +If true, SQL queries are modified to execute on multiple shards. |
| 74 | +In the future, this setting will also affect TransactWriteItems and TransactGetItems. |
| 75 | + |
| 76 | +# TLS |
| 77 | + |
| 78 | +Certificate authority (CA), certificate, and key files for TLS connection to MySQL. |
| 79 | + |
| 80 | +`ca` can be defined alone. |
| 81 | +`key` and `cert` must be defined together. |
| 82 | + |
| 83 | +If no TLS is defined, a TLS-encrypted connection is still used (except for localhost and 127.0.0.1) but the sever identity is not verified. |
| 84 | + |
| 85 | +mlrd auto-detects AWS RDS/Aurora hostnames and uses the AWS Global Certificate Authority (CA) automatically. |
| 86 | + |
| 87 | +# AWS RDS |
| 88 | + |
| 89 | +AWS RDS access if MySQL is an AWS RDS or Aurora instance. |
| 90 | + |
| 91 | +# Low-level Storage |
| 92 | + |
| 93 | +Consult with mlrd.tech before changing these settings. |
| 94 | + |
| 95 | +# OpenTelemetry Metrics |
| 96 | + |
| 97 | +Configures mlrd to send OpenTelemetry metrics via gRPC (OLTP/gRPC). |
| 98 | +Set `endpoint` to enable. |
| 99 | + |
| 100 | +> [!NOTE] |
| 101 | +> **Sys Metrics** |
| 102 | +> Tables inherit sys config metrics if set. This makes it easy to enable metrics for all tables. If table config contains a `metrics` section, it overrides the sys config metrics. |
| 103 | +
|
| 104 | +`freq` is a Go time duration string, minimum "1s" but default "5s" recommended. |
| 105 | + |
| 106 | +`disable` disables table metrics, even if sys metrics are set. |
| 107 | + |
| 108 | +# Percentiles |
| 109 | + |
| 110 | +Percentiles to report for response time metrics. |
| 111 | +Defaults shown: P50 (median) and P99. |
| 112 | + |
| 113 | +# Sampling Rate |
| 114 | + |
| 115 | +Sampling rates (currently only response time). |
| 116 | +Values are every Nth: |
| 117 | + |
| 118 | +- 100 = 1% |
| 119 | +- 20 = 5% |
| 120 | +- 10 = 10% |
| 121 | +- 5 = 20% |
| 122 | +- 4 = 25% (default) |
| 123 | +- 2 = 50% |
| 124 | +- 1 = 100% (not recommended) |
| 125 | + |
| 126 | +# Disable Features |
| 127 | + |
| 128 | +List of [features]({{ref . "feature-flags" }}) to disable. |
| 129 | +Consult with mlrd.tech before setting. |
0 commit comments