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
Be the first to comment on this prompt.
Glossary Terms
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Improve this prompt with the Optimizer
Analyze the prompt, strengthen the context and get a more precise version.
Prompt Engineering
Cross-model principles for writing more reliable prompts.
AI prompts for web developers
Code review and debugging, keeping API keys and secrets out of the prompt.
Security, GDPR & Business Plans
ChatGPT Business, Claude Team, Gemini Workspace and Mistral Vibe compared from vendor sources: training, EU hosting and a GDPR checklist.
Similar Prompts
Task brief for Claude Code: frame a feature end to end
Brief template to delegate a complete feature to Claude Code: goal, starting point, constraints, definition of done, working rules and recap format.
Write a project's CLAUDE.md: the brief Claude Code reads at every session
Turns your project description into a dense CLAUDE.md: commands, structure, conventions, pitfalls, off-limits areas and situations where the agent must ask before acting.
Create a Robust and Secure Webhooks API
A complete prompt to generate a production-ready webhooks API with subscription management, cryptographic signatures, intelligent retries and observability.
Generate Complete Storybooks for Your UI Components
Automatically generates complete Storybook files with variants, interactive controls, interaction tests and MDX documentation for any UI component.