P
💻DeveloppementAdvancedAll AIs

Design a Robust Microservices Architecture

A complete prompt to design a professional microservices architecture covering DDD decomposition, inter-service communication, Kubernetes deployment, and observability.

Paste in your AI

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

Tu es un architecte logiciel senior spécialisé en systèmes distribués et microservices. Je développe un projet [DESCRIPTION DU PROJET] utilisant les technologies suivantes : [STACK TECHNIQUE (ex: Node.js, Python, Go, Java...)]. Le système doit supporter [CONTRAINTES DE CHARGE (ex: 10 000 requêtes/seconde, 1 million d'utilisateurs)]. Conçois une architecture microservices complète en suivant cette structure :

  1. Découpage en domaines métier (Domain-Driven Design) : identifie les bounded contexts, propose un découpage en microservices avec leurs responsabilités précises et les entités gérées par chacun.

  2. Communication inter-services : pour chaque interaction entre services, recommande le pattern adapté (REST synchrone, gRPC, message broker asynchrone via RabbitMQ/Kafka, event sourcing) en justifiant ton choix.

  3. Gestion des données : définis la stratégie de base de données par service (database-per-service), le type de BDD adapté (PostgreSQL, MongoDB, Redis, Elasticsearch), et les stratégies de cohérence (saga pattern, eventual consistency).

  4. API Gateway et authentification : propose l'architecture de l'API Gateway, le mécanisme d'authentification (JWT, OAuth2), le rate limiting et le circuit breaker.

  5. Observabilité : définis la stratégie de logging centralisé, tracing distribué (OpenTelemetry/Jaeger), métriques (Prometheus/Grafana) et alerting.

  6. Déploiement et infrastructure : propose l'architecture de déploiement (Docker, Kubernetes), la stratégie CI/CD, le service mesh (Istio/Linkerd si pertinent), et les environnements (dev, staging, prod).

  7. Résilience et scalabilité : détaille les patterns de résilience (circuit breaker, retry, bulkhead, fallback) et la stratégie de scaling horizontal/vertical.

Pour chaque service identifié, fournis un schéma textuel des endpoints principaux, le modèle de données simplifié, et les dépendances. Inclus un diagramme ASCII de l'architecture globale montrant les flux de communication.

Personalize this prompt with Léa

Answer 3 questions and Léa tailors the prompt to your situation.

Why this prompt works

<p>This prompt guides AI to produce a complete and professional microservices architecture. By providing your <strong>project description</strong>, your <strong>tech stack</strong>, and your <strong>load constraints</strong>, you get an architectural plan adapted to your precise context rather than a generic answer.</p><p>The 7-section structure covers all critical aspects of a distributed architecture: from business decomposition inspired by <strong>Domain-Driven Design</strong> to resilience and observability strategies. Each recommendation is justified, allowing you to understand the architectural trade-offs and adapt them to your needs.</p><p>For best results, be specific about your constraints: <strong>data volume</strong>, <strong>acceptable latency</strong>, <strong>infrastructure budget</strong>, and <strong>team size</strong>. These elements strongly influence choices between synchronous and asynchronous communication, between strong and eventual consistency, and between operational complexity and simplicity.</p>

Use Cases

Design the architecture of a new SaaS project before developmentMigrate an existing monolith to a microservices architecturePrepare a technical architecture document for a team reviewEvaluate and improve an existing microservices architecture

Expected Output

A complete architecture document with microservice decomposition, ASCII flow diagrams, justified technology choices per service, simplified data models, Kubernetes deployment strategy, and detailed resilience patterns.

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

  • LéaAI

    Pour un premier passage, demandez à l’IA de détailler uniquement les étapes 1 et 2 (découpage DDD et communication). Vous éviterez une réponse trop longue et pourrez itérer par étapes. Cette approche est idéale en phase d’exploration rapide avant d’ajouter observabilité et déploiement.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementAdvancedAll AIs

Implement CSP with nonces

Prevent XSS with strict CSP

077
💻DeveloppementBeginnerAll AIs

Implement responsive navigation

Build accessible navbars

0103
💻DeveloppementAdvancedAll AIs

Blue/Green Deployment Strategy

Zero-downtime deployment

082
💻DeveloppementIntermediateAll AIs

Set up GitOps with ArgoCD

Implement GitOps workflows

076