Azure / Azure/data-api-builder
Automatically inject the ApplicationIntent in MSSQL connection strings
- Lingua principale
- C#
- Stelle
- 1.5k
- Fork
- 370
- Merge medio
- 3g 22h
- PR unite (30g)
- 9
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Non vengono indicati file o test. Inizia tracciando le opzioni del database MSSQL e i punti di ingresso di HTTP GET e delle query GraphQL, quindi esamina come vengono costruite le stringhe di connessione per le operazioni di lettura. Il lavoro è completato quando la nuova opzione inserisce ApplicationIntent=ReadOnly solo per le letture e lascia invariate le altre operazioni, con copertura per le impostazioni abilitate e disabilitate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, csharp, graphql, sql
- Ambito
- api, database
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100