Eureka server in aws - netflix-eureka

I have an Eureka service running in ec2 instance, I also have other microservices running in ec2 also, all the services have public ip address. all the services are registered successfully in eureka as wel.
the problem is:
the links that eureka provides are not working!!!
so when I used feign client with eureka naming to communicate between the microservices it doesn't work.
although when I use the direct link of the microservice it works.
does aws encrypt the links or is it something else??!
eureka service running in ec2 public instance

Related

Register a service with multiple instance in Consul

I have a couple of microservices that I want to register in Consul, so that they can find each other and communicate.
Everything runs on docker compose.
I am wondering how that would work if one of the two services has multiple replicas. How does Consul (or docker compose) deal with that? Is there some sort of internal load balancing or what?
Consul supports registering multiple instances/replicas of a service. When a consumer queries the Consul catalog, Consul will return information for each of the registered service instances.
If the consumer/client is querying Consul via DNS, the client's DNS resolver will ultimately be responsible for choosing the endpoint to connect to from the list of IP's in the DNS response.
If the client is querying Consul via the HTTP API (e.g., /v1/agent/health/service/:service), the client must implement its own logic to select an upstream instance from the list of instances returned in the API response.
See the query services section of the Register a Service with Consul Service Discovery tutorial for more info.

Use an existing microservice architecture with kubernetes

I've an existing microservice architecture that uses Netflix Eureka and zuul services,
I've deployed a pod that successfully registers on the discover server but when I hit the API it gives a timeout, what I can think is that while registering on the Discovery server the container IP is given because of which it is not accessible.
Is there a way to either map the correct address or redirect the call to the proper URL looking for a easy way, as this needs to be done on multiple services
I think you should be rethinking your design in Kubernetes way! Your Eureka(service discovery), Zuul server (API gateway/ Loadbalancer) are really extra services that you really don't need in the Kubernetes platform.
For Service discovery and load-balancing, you can use Services in Kubernetes.
From Kubernetes documentation:
An abstract way to expose an application running on a set of Pods as a
network service. With Kubernetes, you don't need to modify your
application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods and can load-balance across them.
And for API gateway, you can think about Ingress in Kubernetes.
There are different implementations for Ingress Controllers for Kubernetes. I'm using Ambassador API gateway implementation.
https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/

ECS - Images using localhost

I have services, one for frontend and one for backend.
I have created 2 images for these services and I would like to deploy them on AWS ECS. Currently, the frontend service communicate with the backend with localhost since it was used locally.
Will it cause issues if I deploy it on AWS on 2 different tasks/instances?
Or is it a way to somehow route localhost from the frontend container to the backend server?
If you deploy the services on 2 different tasks/instances, they could not communicate using localhost. Consider using ECS Service Discovery to manage HTTP and DNS namespaces for your Amazon ECS services, you could refer to the following tutorials:
[1] Tutorial: Creating an Amazon ECS Service That Uses Service Discovery Using the Amazon ECS CLI - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cli-tutorial-servicediscovery.html
[2] https://ecsworkshop.com/microservices/

Internal Loadbalancing and Service Fabric

Is it possible to 'hide' Service Fabric application using Internal Load Balancing? I couldn't find any guides to do that?
I want that all public endpoints are only accessible through vpn, including 19000 and 19080.

Understanding Eureka peer-to-peer communication

I am working with microservices and netflix oss. I am using Eureka for service registry and discovery. I am trying out different options to understand behaviour of Eureka server. I still have some doubts with respect to below mentioned scenario.
I have couple of microservices, Service-A and Service-B. I also have two Eureka server instances viz. Eureka-1(port:8761) and Eureka-2(port:8762). I have registered both services with only Eureka-1. Also, service-A is invoking Service-B using eureka service instance name.
When I run Service-A, Service-B, Eureka-1 and Eureka-2 services, I am able to hit Service-A which internally hitting Service-B as expected. However, when I take Eureka-1 instance down and hit service-A, it still able to hit Service-B internally using eureka service instance name. My question is does Eureka-2 instance come to know about services registered with Eureka-1 instance. If yes, how and when does this communication happens between Eureka server instances?? Please help me understand this.
There is a good write up on the Netflix site (https://github.com/Netflix/eureka/wiki/Understanding-Eureka-Peer-to-Peer-Communication) that explains how eureka peer to peer happens.
If you have both eureka-1 and eureka-2 pointing at each other (i.e. their eureka client definition in the yml files), then when you register to eureka-1, eureka-2 will get the list of available services from eureka-1.
So once paired, eureka-2 will have the same list as eureka-2 and discovery will work.
You should probably put your eureka-1 and 2 configuration in your question so we have more detail