Menu

Microservice Patterns: Rules, Boundaries, and Commands
📰

Microservice Patterns: Rules, Boundaries, and Commands

DEV Community: microservices·Joung Park·7 days ago
#ylgT5byD
#devtomicroservices#devto#dev#user#kafka
Reading 0:00
15s threshold

We run a fleet of Nest services on ECS and PM2, with Kafka for domain integration and Firebase at the API gateway. That stack only works if we agree on a few defaults: who owns data, when to use events versus HTTP, how contracts are defined, and where auth stops. This post is our engineering playbook for those defaults—not a claim that every service already matches them. Some rules describe where we want to be (for example strict one-database-per-service everywhere); others we apply today with known gaps (consumer backoff patterns still being defined).

The post has three parts: ten foundation principles , patterns for crossing domain boundaries (with Order and User as the running example), and a payment debit/credit case study on why implicit event listeners are painful and what explicit commands buy us.

1. Each microservice owns its data

Rule: one domain, one database.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.