P
💻DeveloppementAdvancedAll AIs

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

Adapt this prompt

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:

  1. 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.

  2. 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.

  3. 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).

  4. API Gateway and authentication: propose the API Gateway architecture, the authentication mechanism (JWT, OAuth2), rate limiting, and the circuit breaker.

  5. Observability: define the centralized logging strategy, distributed tracing (OpenTelemetry/Jaeger), metrics (Prometheus/Grafana), and alerting.

  6. 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).

  7. 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

Design the architecture of a new SaaS project before developmentMigrate an existing monolith to a microservices architecturePrepare a technical architecture document for a team reviewEvaluate and improve an existing microservices architecture

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 Optimizer

Comments

Be the first to comment on this prompt.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementIntermediateClaude

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.

1659
💻DeveloppementIntermediateClaude

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.

629
💻DeveloppementAdvancedAll AIs

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.

405
💻DeveloppementIntermediateAll AIs

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.

465