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.
You are a senior software architect specializing in distributed systems and microservices. I'm building a project [project description] using the following technologies: [tech stack (e.g., Node.js, Python, Go, Java...)]. The system must handle [load constraints (e.g., 10,000 requests/second, 1 million users)]. Design a complete microservices architecture following this structure:
-
Business domain breakdown (Domain-Driven Design): identify the bounded contexts, propose a breakdown into microservices with their precise responsibilities and the entities each one manages.
-
Inter-service communication: for each interaction between services, recommend the appropriate pattern (synchronous REST, gRPC, asynchronous message broker via RabbitMQ/Kafka, event sourcing) and justify your choice.
-
Data management: define the database strategy per service (database-per-service), the appropriate database type (PostgreSQL, MongoDB, Redis, Elasticsearch), and the consistency strategies (saga pattern, eventual consistency).
-
API Gateway and authentication: propose the API Gateway architecture, the authentication mechanism (JWT, OAuth2), rate limiting, and the circuit breaker.
-
Observability: define the centralized logging strategy, distributed tracing (OpenTelemetry/Jaeger), metrics (Prometheus/Grafana), and alerting.
-
Deployment and infrastructure: propose the deployment architecture (Docker, Kubernetes), the CI/CD strategy, the service mesh (Istio/Linkerd if relevant), and the environments (dev, staging, prod).
-
Resilience and scalability: detail the resilience patterns (circuit breaker, retry, bulkhead, fallback) and the horizontal/vertical scaling strategy.
For each service identified, provide a text diagram of the main endpoints, the simplified data model, and the dependencies. Include an ASCII diagram of the overall architecture showing the communication flows.
Personalize this prompt with Léa · AI assistant
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
This prompt guides AI to produce a complete and professional microservices architecture. By providing your project description, your tech stack, and your load constraints, you get an architectural plan adapted to your precise context rather than a generic answer. The 7-section structure covers all critical aspects of a distributed architecture: from business decomposition inspired by Domain-Driven Design to resilience and observability strategies. Each recommendation is justified, allowing you to understand the architectural trade-offs and adapt them to your needs. For best results, be specific about your constraints: data volume, acceptable latency, infrastructure budget, and team size. These elements strongly influence choices between synchronous and asynchronous communication, between strong and eventual consistency, and between operational complexity and simplicity.
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
Implement canary deployments
Roll out changes safely with canary
Design a Complete REST API
Design a robust and well-structured REST API with OpenAPI documentation, error handling, and security best practices.
Sora Prompt for Generating a Database Schema
Sora, the visual generation model developed by OpenAI, offers interesting possibilities for creating visual representations of database schemas. Instead of working with traditional technical tools like dbdiagram.io or Lucidchart, Sora can generate entity-relationship (ER) diagrams, relational schemas, and data architecture visualizations as clear, professional images. This approach is particularly useful for presentations, technical documentation, or initial design phases where you want to quickly visualize database structure without using specialized tools. By crafting a precise prompt describing tables, relationships, and constraints, you can obtain a usable visual schema in seconds. In this guide, we provide an optimized prompt for Sora along with several variants tailored to your expertise level and project complexity.
Implement drift detection
Detect infrastructure drift