Azure / Azure/data-api-builder
Automatically inject the ApplicationIntent in MSSQL connection strings
- 主要言語
- C#
- スター
- 1.5k
- フォーク
- 370
- 平均マージ
- 3日 22時間
- マージ済み PR(30日)
- 9
説明
Azure SQL can take advantage of automatically distributing the **read-only** workload to secondary high-availability replicas, by setting the `ApplicationIntent=ReadOnly` in the connection string: https://learn.microsoft.com/en-us/azure/azure-sql/database/read-scale-out?view=azuresql
It would be great if there could be a setting for MSSQL that tells DAB to automatically inject the `ApplicationIntent=ReadOnly` setting in the connection string whenever a read operation is performed. DAB knows exactly when a read operation is performed, as it happens only in two cases:
- HTTP GET request
- GraphQL Query request
This configuration settiong would go into the database-specific options:
```json
"data-source": {
"database-type": "mssql",
"connection-string": "@env('MSSQL')",
"options": {
"set-session-context": false,
"auto-read-only-intent": true
}
}
```
With this feature DAB would be able to take advantage of read-scale out capabilities of MSSQL, providing even better scalability options.
コントリビューションガイド
調査の方向性
ファイルやテストは指定されていません。まず MSSQL データベースのオプションと HTTP GET および GraphQL クエリのエントリーポイントを追跡し、次に読み取り操作用の接続文字列がどのように構築されるかを調べます。新しいオプションが読み取りに対してのみ ApplicationIntent=ReadOnly を注入し、他の操作を変更せず、設定が有効および無効の場合のカバレッジがあることをもって完了とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- azure, csharp, graphql, sql
- 領域
- api, database
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100