Les 9 contraintes majeures de la productionCopier Imprimer Fermer
Risque SymptĂŽmes Contreâmesures Concurrence dâaccĂšs timeouts, verrous, 429 LB, cache, file dâattente, backâpressure ĂlasticitĂ© pics imprĂ©vus autoâscaling, HPA/KEDA, tests charge
Nginx (extrait) â backâpressure limit_req_zone $binary_remote_addr zone=api:10m rate=15r/s; server { location /api/ { limit_req zone=api burst=20 nodelay; proxy_pass http://upstream; } }
ProblĂšme Signal Mesure Tables > 100M lignes Seq Scan gĂ©ants partition range, index BRIN/partiels RequĂȘtes lentes spill to disk work_mem ciblĂ©, prĂ©âagrĂ©gations
PostgreSQL â EXPLAIN (ANALYZE, BUFFERS) # Conseils: index partiel sur paid_at, partition mensuelle, Ă©viter SELECT *
IAM, chiffrement au repos/en transit Secrets management Audit, patching, durcissement Headers Nginx (extrait) add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; add_header Content-Security-Policy "default-src 'self' https: data:; object-src 'none'" always;
Lifecycle clair : semver migration db idempotente compatibilité
Django â migration sĂ»re python manage.py makemigrations && python manage.py migrate --plan # Canary: activer le code lisant la nouvelle colonne avant lâĂ©criture
Ăquilibre openâsource / propriĂ©taire : coĂ»ts, support, SLA, lockâin.
CritÚre Question Coût CAPEX vs OPEX ? croissance prévue ? Conformité RGPD, localisation des données ?
Google, O/S, APIs, CDN : risques de panne en cascade â timeouts, retry, circuitâbreaker .
Pattern circuitâbreaker (pseudo) if failures(service)>N and within T: open_breaker(); else call(service)
Préparer le retour arriÚre avant le déploiement .
Backups testés Migrations réversibles Feature flags Tuning & monitoring par défaut : metrics logs traces profilage SQL
PrometheusRule (extrait) - alert: HighErrorRate expr: rate(http_requests_total{status=~"5.."}[5m]) > 0.05 for: 10m
Veille technologique â mode. Arbitrer nouveautĂ©/stabilitĂ© selon risque et impact .
Demande Ăvaluation DĂ©cision K8s majeur breaking changes ? coĂ»t ? canary par env, freeze si pic ventes