Everyone wants to build microservices until they accidentally build a "Distributed Monolith."
When I was building a Patient Management System, I split the backend into separate services: Auth, Patient Records, Billing, and Notifications.
My first instinct was to have them talk to each other via standard REST APIs. But I quickly realized a problem: if the Billing service went down, patient registration would fail too. That’s not microservices; that’s a distributed monolith.
How I fixed it? Event-Driven Architecture.
Instead of synchronous REST calls, I introduced Apache Kafka. When a patient successfully registers, the Patient Service just publishes a "PatientRegistered" event and moves on. The Billing and Notification services consume that event at their own pace.
The result?
Total decoupling.
If the notification service crashes, registrations still succeed.
Much better fault tolerance.
The biggest lesson I've learned as a backend engineer: Microservices aren't about how many services you can build; they are about how well your services can survive without each other.
Backend devs, do you prefer synchronous REST for inter-service communication, or do you lean towards message brokers like Kafka? Let me know below.
Top comments (0)