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

Next Step

Continue to Design a Cassandra schema for storing user activity events with the ability to query: 1) All events for a user in the last 7 days, 2) All events of a specific type today.← Back to all NoSQL questions