Monolith Decomposition Guide¶
Transform your monolith into microservices with Tessera.
When to Decompose¶
Consider decomposition when:
- Team is growing and stepping on each other
- Deployments are slow and risky
- Scaling is difficult (all or nothing)
- Technology choices are locked in
- Testing takes too long
The Process¶
1. Analyze¶
infraiq tessera analyze \
--source . \
--database-url $DATABASE_URL \
--use-ai \
--output analysis.json
2. Design¶
infraiq tessera design \
--analysis analysis.json \
--pattern hybrid \
--target-services 5-7 \
--output mosaic.yaml
3. Review¶
# Interactive review
infraiq tessera design \
--analysis analysis.json \
--interactive \
--output mosaic-final.yaml
4. Generate¶
infraiq tessera craft \
--mosaic mosaic-final.yaml \
--framework fastapi \
--include-docker \
--include-ci \
--output ./services
5. Validate¶
Best Practices¶
- Start with domain analysis — Understand your business domains
- Identify seams — Look for natural boundaries
- Data first — Plan data ownership before splitting
- Incremental — Extract one service at a time
- Keep the monolith running — Strangler fig pattern
Next Steps¶
- Tessera — Full documentation
- Heroku to AWS Guide — Combine with migration