advancedTop 30 Scenario-Based Questions
How would you migrate from a monolithic PostgreSQL to a microservices NoSQL architecture?
Strangler Fig pattern: 1) Phase 1 — Identify services: identify bounded contexts (Orders, Users, Products, Notifications). 2) Phase 2 — Add caching first: add Redis in front of PostgreSQL for hot data. Zero risk. 3) Phase 3 — Extract read models: create MongoDB read models fed by CDC (Change Data Capture) from PostgreSQL via Debezium. API serves reads from MongoDB. 4) Phase 4 — Extract write path:
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response