Refactor doc generation processes to eliminate exponential backoff in step functions
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- aws, typescript
Direzione di ricerca
Inizia da src/backend/orchestration/index.ts, in corrispondenza della configurazione collegata di exponential backoff, quindi leggi l’esempio di callback-task di AWS Step Functions a cui fa riferimento l’issue. Il lavoro è completato quando l’orchestrazione non dipende più da ripetuti errori di invocazione di ECS e supporta invece il lavoro accodato, l’avvio dei task consapevole della capacità, le risposte di callback e un percorso di errore di sei ore verso la DLQ.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Background
When the doc generation process has issues, it's possible for its DLQ to get very large. (For example, in the Gamma account the DLQ currently has 20,000+ messages). When a Lambda is invoked to redrive these messages, it simply initializes thousands of step function executions, which delegate ECS tasks for generating documentation for individual languages. Since this spike of workload is far greater than what ECS can handle at once, the step function frequently gets throttled, so it has been configured with a very slow but exponential backoff:
Problem
This backoff-and-retry solution causes the history of individual executions gets cluttered with dozens of failed ECS task requests, and moreover, the larger the number of concurrent tasks that are being executed, the longer it will take for the state machine executions to reach a point in time where individual tasks make progress.
Proposed solution
We can make this architecture more stable by introducing a queue, and a lambda function that polls from the queue and starts tasks whenever we are not close to hitting the task limit (e.g. below 80% capacity). In the state machine that spawns the individual tasks, instead of invoking the ECS task directly, it will add the tasks to an SQS queue, and then wait to receive a response before continuing the state machine, in accordance with the pattern described here: https://docs.aws.amazon.com/step-functions/latest/dg/callback-task-sample-sqs.html We can assume if the task execution does not hear a response for at least 6 hours, then it has failed and should go into the DLQ.
This would eliminate all errors caused by trying to invoke too many ECS tasks at once, while also giving us greater flexibility over how much compute we should allocate to the ECS cluster (we could likely set up autoscaling based on the amount of items in the queue).
Open Questions
The proposed solution is a somewhat common serverless architecture pattern - is there an existing CDK L3 construct we can use to abstract this behavior? If not, could we create one?
- Lingua principale
- TypeScript
- Stelle
- 239
- Fork
- 30
- Merge medio
- 11h 4m
- PR unite (30g)
- 15
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cdklabs/construct-hub
-
documentation
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
cdklabs/construct-hub#1884 ·
I maintainer di solito rispondono entro 1 giorno
-
Filter for aws cdk v2Apertafeature-request p1
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
cdklabs/construct-hub#1550 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
feature-request p2
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
cdklabs/construct-hub#1500 ·
I maintainer di solito rispondono entro 1 giorno
-
feature-request p2
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
cdklabs/construct-hub#1491 ·
I maintainer di solito rispondono entro 1 giorno
-
feature-request p2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
cdklabs/construct-hub#1471 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cdklabs/construct-hub
Issue simili
-
`cf complete zsh >> .zshrc` fails on vanilla zshForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#340 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Rename Madson cameraAperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 75/100
StoDevX/AAO-React-Native#8785 ·
I maintainer di solito rispondono entro 1 giorno
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitForse già presa @myOmikron l’ha presa oggi. Apertabug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100