Search code examples
spring-bootapache-kafkanetflix-ribbon

Difference between Kafka and load balancer (Ribbon)


I am new to Kafka.

I have existing microservice with spring-boot, ribbon, eruka, and zuul.

If I use Kafka as the messaging platform between each microservice call, does kafka provide load balancer for microservice and I can get rid of ribbon ?

Please give me some suggestions.

Thanks


Solution

  • Kafka stores data in a distributed log and provides external clients for building a streaming platform. It is not a load balancer; but data is partitioned amongst servers so load is distributed as part of its custom TCP protocol.

    Ribbon is a stateless service for spreading load over other services. I haven't used it, but it does not have an asynchronous, client, push-pull model to anything


    You could use them together... A Kafka consumer would start an HTTP / RPC call to a Ribbon server