I am trying to set up micro service architecture using spring boot
. I have created it by separating the components and using techniques like ribbon
, eureka naming server
, zuul API
etc.
service1
reading inputs from a db and calling service2
through ribbon, eureka and zuul.
List<Object> inputs= ...
for(Object input: inputs){
service2Proxy.process(input); // calling service 2
}
Is it possible to call the service2
based on the number of available instance of service2
?
ie, If there are 3 instance of service2
is available at a time, I need to call only 3 requests to service2
at a time.
What is the solution for this problem?