Microservices Architecture Migration Planner
Plan a structured migration from a monolithic application to microservices, covering service decomposition, data ownership, API contracts, migration phases, and rollback strategies.
Prompt Template
I need to plan a migration from a monolithic application to a microservices architecture. **Current stack:** [e.g., Rails monolith, Django, Node.js Express] **Database:** [e.g., PostgreSQL, MySQL, MongoDB] **Current pain points:** [e.g., slow deploys, scaling bottlenecks, team coupling] **Team size:** [number of developers] **Number of major domains/modules:** [e.g., auth, billing, orders, notifications] **Current deployment:** [e.g., single server, Kubernetes, Heroku] **Timeline pressure:** [aggressive / moderate / flexible] **Key constraints:** [e.g., zero downtime required, limited DevOps experience] Please provide: 1. **Domain decomposition analysis** — identify candidate microservices from my modules using domain-driven design principles 2. **Dependency map** — show which services depend on each other and identify the riskiest couplings 3. **Recommended extraction order** — which service to extract first and why (strangler fig pattern) 4. **Data migration strategy** — how to split the shared database without breaking referential integrity 5. **API contract design** — communication patterns (sync REST/gRPC vs async events) for each service boundary 6. **Migration phases** — a phased roadmap with milestones and go/no-go criteria 7. **Rollback plan** — how to revert each phase if things go wrong 8. **Infrastructure requirements** — service mesh, API gateway, observability, and CI/CD changes needed
Example Output
🔧 Monolith → Microservices Migration Plan
Stack: Django Monolith → Kubernetes Microservices
1. Domain Decomposition
| Service | Domain | Current Module | Risk Level |
|---------|--------|----------------|------------|
| auth-service | Authentication & Users | | Low |
| billing-service | Payments & Subscriptions | | High |
| order-service | Order Management | | High |
| notification-service | Email, SMS, Push | | Low |
| catalog-service | Product Catalog | | Medium |
2. Dependency Map
**Riskiest coupling:** — tightly coupled through shared model with FK constraints.
3. Extraction Order (Strangler Fig)
**Phase 1: notification-service** (lowest risk, fewest dependencies)
- Extract email/SMS sending behind an event queue
- Monolith publishes events, new service consumes them
- Rollback: re-enable monolith notification module
Phase 2: auth-service
- Extract to standalone service with JWT issuing
- Implement API gateway for token validation
- All other services validate JWTs independently
Phase 3: catalog-service → Phase 4: order-service → Phase 5: billing-service
4. Data Migration Strategy
- **Phase 1-2:** Shared database with schema-level isolation (separate schemas per service)
- **Phase 3+:** Database-per-service with Change Data Capture (Debezium) for sync
- **Cross-service queries:** Replace JOINs with API calls + local caching
- **Eventual consistency:** Accept 2-5 second propagation delay for non-critical reads
Tips for Best Results
- 💡Start with the least coupled, lowest-risk service — "notifications" is often the best first extraction
- 💡Use the strangler fig pattern: route traffic gradually to the new service while keeping the monolith as fallback
- 💡Don't split the database too early — shared database with schema isolation is a valid intermediate step
- 💡Invest in observability (distributed tracing, centralized logging) before extracting your second service
Frequently Asked Questions
What is the Microservices Architecture Migration Planner prompt?
Plan a structured migration from a monolithic application to microservices, covering service decomposition, data ownership, API contracts, migration phases, and rollback strategies. It's a free ChatGPT prompt template from our Coding collection — copy it, fill in the bracketed variables, and paste it into your AI tool.
Which AI tools work with this prompt?
It's written and tested for ChatGPT, Claude and Gemini. Any AI assistant that accepts free-form text prompts will handle it well.
How do I customize this ChatGPT prompt?
Replace the bracketed variables — such as [e.g., PostgreSQL, MySQL, MongoDB], [number of developers], [e.g., single server, Kubernetes, Heroku] — with your own details before running it. Start with the least coupled, lowest-risk service — "notifications" is often the best first extraction
Is this prompt free to use?
Yes. Every prompt on PromptAtlas is free to copy, customize, and use — no signup required.
Related Prompts
gRPC Error Handling and Retry Design Guide
Design reliable gRPC service error handling with status codes, deadlines, retries, idempotency, interceptors, and observability.
Redis Cache Invalidation and TTL Strategy Guide
Design a Redis caching strategy with key naming, TTL rules, invalidation triggers, stale data safeguards, observability, and rollout planning.
Event Sourcing Replay and Backfill Runbook Builder
Plan a safe event replay or projection backfill with idempotency rules, batching, validation, rollback triggers, and operator checklists.