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 :
-
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.
-
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.
-
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).
-
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.
-
Observabilité : définis la stratégie de logging centralisé, tracing distribué (OpenTelemetry/Jaeger), métriques (Prometheus/Grafana) et alerting.
-
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).
-
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
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
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.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
- 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
Create a React component
Scaffold new UI components quickly
Sora Prompt for Documenting Code
Code documentation is often neglected by developers due to lack of time or motivation. Yet visual and dynamic documentation can transform project understanding. Sora, OpenAI's video generation model, opens unprecedented possibilities for creating explanatory videos that accompany your code. Rather than writing pages of text that no one will read, imagine visual clips showing data flow in your application, your microservices architecture, or the user journey through your interface. With the right prompts, Sora can generate clear animations illustrating complex technical concepts: animated sequence diagrams, data structure visualizations, or step-by-step API demonstrations. This approach is particularly effective for onboarding new developers, internal tech presentations, and public documentation of open source projects. The challenge lies in precise prompt formulation so Sora produces technically coherent and pedagogically useful videos. This guide provides optimized prompts to transform your code documentation into engaging, professional visual content.
Sora Prompt for Refactoring Code
Code refactoring is a crucial step in the software development lifecycle, aiming to improve the internal structure of a program without changing its external behavior. With the emergence of generative AI models like OpenAI's Sora, new approaches are emerging to assist developers in this complex task. Sora, thanks to its advanced contextual understanding, can analyze existing code blocks and suggest intelligent restructurings that respect best programming practices. Whether you're looking to eliminate duplicated code, simplify overly long functions, apply recognized design patterns, or improve the overall readability of your codebase, a well-crafted prompt yields relevant and immediately applicable refactoring suggestions. The main challenge lies in the precise formulation of your request: the more context you provide about the existing architecture, technical constraints, and quality goals, the more usable the results will be. This guide offers optimized prompts to get the most out of Sora in your refactoring projects, regardless of your expertise level.
Write a CloudFormation template
Write CloudFormation templates