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.
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
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.
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
Source Code Security Audit
Audit your code security according to the OWASP Top 10 with vulnerability identification, exploitation PoC, and fixes.
AI-Assisted Complete Code Review
A complete prompt to get an in-depth code review covering bugs, security, performance, readability, and best practices, with concrete fixes.
Create an Optimized Production Dockerfile
Create a multi-stage Dockerfile optimized for production with maximum security, lightweight image, and best practices.
Master Advanced TypeScript Types
Strengthen your code's type safety with advanced generics, utility types, and discriminated unions.