Design a Microservices Architecture
Design a complete microservices architecture with DDD decomposition, communication patterns, resilience, 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 spécialisé dans les systèmes distribués et les architectures microservices. Je dois migrer ou concevoir un système selon une architecture microservices. **Système à concevoir :** [DESCRIPTION_DU_SYSTÈME: ex. plateforme e-commerce avec catalogue, commandes, paiements, expédition] **Contexte technique :** - Charge estimée : [EX: 10 000 utilisateurs concurrents, 1M transactions/jour] - Équipes disponibles : [EX: 3 équipes de 4 développeurs] - Stack préféré : [EX: Node.js, Python, Go, Java] - Infrastructure : [EX: Kubernetes sur AWS, GCP, Azure] - Contraintes : [EX: conformité PCI-DSS, latence < 100ms, haute disponibilité] Conçois l'architecture microservices complète : 1. **Décomposition des services** : identifie les bounded contexts selon DDD et propose les microservices avec leurs responsabilités. Justifie la granularité choisie. 2. **Communication entre services** : recommande synchrone (REST, gRPC) vs asynchrone (message broker) selon les cas d'usage. Propose la topologie de l'event bus si applicable. 3. **Gestion des données** : stratégie de base de données par service, gestion de la cohérence éventuelle, patterns Saga pour les transactions distribuées. 4. **Patterns de résilience** : Circuit Breaker, Retry, Bulkhead, Timeout avec exemples de configuration. 5. **Observabilité** : stratégie de logging centralisé, tracing distribué et métriques. 6. **Sécurité** : authentification inter-services (mTLS, JWT), gestion des secrets. 7. **Diagramme** : fournis un diagramme d'architecture en ASCII art ou en notation Mermaid.
Why this prompt works
<p>This prompt covers the seven critical dimensions of a microservices architecture starting from DDD (Domain-Driven Design) fundamentals for service decomposition. Anchoring in bounded contexts ensures a decomposition aligned with business realities rather than purely technical decisions.</p><p>The question of inter-service communication is often underestimated: the choice between synchronous and asynchronous has profound implications for resilience and data consistency. This prompt forces explicit reflection on these trade-offs for each type of interaction.</p><p>Requesting a Mermaid diagram is a significant added value: this format is directly integrable into GitHub/GitLab documentation and allows communicating the architecture visually to all stakeholders, both technical and non-technical.</p>
Use Cases
Expected Output
A complete architecture specification with identified services, communication strategies, resilience patterns, and Mermaid diagram.
Learn more
Check the full skill on Prompt Guide to master this technique from A to Z.
View on Prompt Guide📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Similar Prompts
Debug a Production Error
Quickly analyze a production error with a structured Root Cause Analysis approach and an immediate action plan.
Refactor Legacy Code Step by Step
This prompt guides AI to analyze legacy code and produce a structured refactoring plan with diagnosis, prioritization, tests, and modernized code.
Write Integration Tests for an API
Create complete API integration tests with database setup, authentication, CRUD, and end-to-end scenarios.
Create a CLI Tool with Node.js
Create a professional Node.js CLI tool with Commander.js, Inquirer, visual feedback, and npm publishing.