kmar akrout
kmar akrout

Reputation: 365

Reduce the use of feign calls in micro-services architecture

So far I've been studying micro-services architecture and decoupling a monolithic monster.
I'm currently using feign clients in order to make easy the conversation between micro-services.
As I'm neck level immersed in the code of my monolithic application, I found that I’m using way too much feign calls, the thing that is compromising my dream of a totally decoupled application with independent micro-services.

So my question is about gathering ideas or just opinions; because on the internet it's just rainbows and flowers about feign, no one is noticing that after all, it's coupled, because micro-service A won't deliver any answer unless it receives data from B.

So can you think of any way that maybe reduces feign calls? Or do you even see it as a drawback to micro-services architecture ?

Upvotes: 3

Views: 676

Answers (1)

Karol Dowbecki
Karol Dowbecki

Reputation: 44932

You can't avoid communication in a distributed system, the services must call each other to avoid duplication. If you can redesign the system you can potentially swap some of the Feign synchronous calls for asynchronous events e.g. by using Apache Kafka.

The drawback might be the size of your micro-services. If you find yourself constantly modifying a number of them to deliver a single feature it might be that they are too fine grained. There is no one-size-fit-all when it comes to micro-services.

Upvotes: 3

Related Questions