I'm working on a project based on AWS and I am new to both of AWS and Eureka.
There are number of micro services built with spring boot. Each of them are deployed as separate beanstalk application. Beanstalks are in our VPC and auto scalable and load balanced by ELB.
We are using spring cloud discovery service with Eureka for inter service communication. My problem is that if a service(A) found another service(B) then B should be referenced by host name or ip address. And that address should be ELB address, not the EC2 private IP.
How can I let Eureka know the ELB address instead of specific EC2 instance IP. (We are not considering of EIP.)
Or Any idea for better architecture?