hardSenior Backend EngineerTechnology
How do microservices communicate — REST, gRPC, and event-driven?
Posted 18/04/2026
by Mehedy Hasan Ador
Question Details
"Breaking monolith into 5 services. REST, gRPC, or message queues?"
Suggested Solution
// gRPC: Binary Protocol Buffers, 7-10x faster than REST JSON
// Events: Fire and forget, eventual consistency
await kafka.produce("order.created", { orderId });
kafka.consume("order.created", async (e) => { await processPayment(e); });
Recommendation: gRPC for synchronous needs (auth, payment), async events for fire-and-forget (notifications, analytics), REST for external APIs only.