Azure / Azure/data-api-builder
Automatically inject the ApplicationIntent in MSSQL connection strings
- Vorherrschende Sprache
- C#
- Sterne
- 1.5k
- Forks
- 370
- Ø Merge
- 3 T. 22 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Es werden keine Dateien oder Tests genannt. Beginne damit, die MSSQL-Datenbankoptionen und die Einstiegspunkte für HTTP GET und GraphQL-Abfragen nachzuverfolgen, und untersuche anschließend, wie Verbindungszeichenfolgen für Leseoperationen erstellt werden. Als abgeschlossen gilt die Arbeit, wenn die neue Option ApplicationIntent=ReadOnly nur für Lesevorgänge injiziert wird, andere Operationen unverändert lässt und eine Abdeckung für aktivierte und deaktivierte Einstellungen vorhanden ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- azure, csharp, graphql, sql
- Bereich
- api, database
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100