Microservices Communication, Remote Calls vs Communication through Apache Kafka

Alex Mosso
DataSeries
Published in
2 min readJul 15, 2020

--

Typically, microservices communicate to each other through remote calls, using inter-process communication protocols like HTTP, AMQP, TCP, etc.

But we have observed many troubles using this approach. And basically, we have faced a lot of troubles because each microservice will have a different data processing rate. The processing rate of each microservice will depend on business logic, algorithms complexity, data volume, data transformations, etc.

So lets suppose we have a microservice capable to process 1000 records/sec, and this microservice communicates with a second one which throughput is 700 records/sec.

Clearly we have a trouble here. While one microservice is sending 1000 records per second, the other one can only process 700 records per second. So, if the system reaches maximum capacity this will be a point of failure, maybe some messages will be lost, and system will spend some time to recover.

Communication through Apache Kafka

Now let’s communicate our microservices using Apache Kafka topics, instead of remote protocol communication.

Now I’m not sending messages directly from one microservice to another, instead of that, I’m sending all messages to a…

--

--

Alex Mosso
DataSeries

I solve problems to empower operations, maximize performance and increase profits.