Using Netflix Eureka on Kubernetes - spring-boot

We are currently setting up a Micro-service Architecture using spring boot and netflix components, for Deployment we are planning to go with aws kubernetes(EKS) setup. We are in a in a dilemma to choose whether to use netflix's Eureka & ribbon services on Kubernetes for service discovery or to use Kubernetes own service discovery Mechanism. The advantages I see in using k8s service discovery is that horizontal scaling becomes easy. Any thoughts on this will be really good for us to take it in the right direction.
Thanks.

If you don't have a strong case for client side load balancing I would not use Eureka and ribbon. I am getting the load balancing and service discovery from my platform (k8s) for free. If not for client side load balancing, there is no value that eureka and ribbon brings other than beefing up your resume :). On the other hand, it brings another stack that you need to maintain in the long term.
This is a kind of related question

Related

Service discovery for microservices

I need some help in understanding how we implement service discovery for microservices in kubernetes.
Im going through some tutorials on spring boot and noticed that wr need to use Eureka discovery for implementing service discovery for maintaining communication b/w microservices. But my question is if we deploy those spring boot microservices in kubernetes, do we still need to use Eureka tool? We can use kubernetes services for implementing service discovery and load balancing right?
Kubernetes orchestration platform provides CoreDNS for Service discovery. Micro services when they get deployed to the platform can utilise the services by default no need to implement it unless if there is specific requirements which is not satisfied . Kubernetes Loadbalancer services type can be used for load balancing of services

Why do we need Eureka and Spring boot load balancer when using Kubernetes not in the cloud?

For microservices architecture not in the cloud :
What is the difference between the load balancer of Kubernetes and the load balancer of spring cloud?
what are the advantages of implementing Eureka and spring boot load balancer when using Kubernetes for deployment rather than using Kubernetes load balancer and kubernetes service discovery?
Quite a complex question but here are my thoughts on the matter:
Before actually answering the questions, I must say that my experience setting up Kubernetes load balancer outside of public clouds is a hassle so I wouldn't recommend the approach but, assuming that it is not an issue for you, the main difference is how things are set ut. I would say that the biggest advantage of having it in Kubernetes is that you may also have service mesh solution like Istio that gives you other advantages that just load balancing. Furthermore, it would be easier to do canary (or other special type of) deployments with infrastructure load balancing than with Spring.
The only real advantage I see is if you have different teams with responsibility of the infrastructure, deployment and coding. Say if the Kubernetes team is responsible for creating services, deployments, etc and is overloaded, you might get code out faster if your dev team has capacity and competence but, again, there would be no point using Kubernetes then. Or in case you cannot actually create the LoadBalancer service in Kubernetes (as mentioned - not always straightforward in non cloud env)
On a side note, if you are on the way to deploying Kubernetes internally and want to get it to work, have a look at Metallb

When to use spring cloud like Eureka discovery,Ribbon etc if we have the same while we deployed the application in K8s?

We have load balancing, discovery, etc in the Spring cloud. But the same load balancing, discovery is available in Kubernetes as well. So just wanted to know when we should go with Spring cloud (load balancing or discovery) and when to use Kubernetes
It depends on your use-case. There can be situations where you need to directly use Eureka server registry and Eureka client discovery offered by Spring Cloud Netflix. Ribbon is the client side load balancer provided by Spring Cloud Netflix.
In my experience, it is not impossible to use Eureka in any environment. It can be your local data centre or cloud infrastructure. However when it comes to deployment environment, there are so many alternatives for us to achieve the server registry mechanism. Sometimes those alternatives are the best solutions. I will give you an example below...
If you host your application in your local server (Local data centre)
Now in this scenario you can use Eureka and continue your server registry and discovery mechanism. (That is not the only way. I mentioned Eureka for this scenario because it would be a good use case for it)
If you host your application in AWS infrastructure
The AWS environment gives you lots of benefits and services such that you can forget the burden of maintaining and implementing Eureka. You can achieve simply the same behaviour by AWS load balancers, AWS target groups and even more by adding AWS auto scaling groups. In AWS it self there are so many other ways to achieve this as well.
Long story in short that for your scenario, you can continue using the power of Kubernetes and get the privilege unless you have a specific reason to use Eureka and put a large effort to implement it. You should select what suits the best depending on time, effort, maintainability, performance etc.
Hope this helps for you to get an idea. Happy coding!

Server-side load balancing and Third-Party discovery with Zuul & Consul / Eureka

we are planning to built our next projects using microservices-architecture and we have already defined that we want to use Zuul as API-Gateway. Right now we have to decide which service registry we will use:
Consul or Eureka.
We want to use server-side load balancing (via Zuul itself). Is it possible to do this while combining Zuul with Consul or Eureka?
Furthermore, we don’t want to use self-registration pattern! Our plan is to use Third-Party registration! Is it possible while combining Zuul with Consul or Eureka? Which tools can be used for this? Are there alternatives for Registrator which works for Docker?
Thanks a lot in advance for your help!

what is the difference between netflix zuul server and netflix eureka server?

i have created two java spring-boot micro services they are
1) producer
2) consumer
and i have used spring eureka server for service registration and discovery . it worked fine . then what is the use of Netflix Zuul.
Let's suppose you have 20 services to which user can interact to, and of course we are not going to expose each and every services publicly because that will be madness (because all services will have different ports and context), so the best approach will be to use an API gateway which will act as single entry point access to our application (developed in micro service pattern) and that is where Zuul comes into picture. Zuul act as a reverse proxy to all your micro-services running behind it and is capable of following
Authentication
Dynamic Routing
Service Migration
Load Shedding
Security
Static Response handling
Active/Active traffic management
You can go through documentation here
If you have enough experience in the domain, you could look at zuul as an API gateway like Apigee. It is very feature rich and touches up on a lot of different concerns like routing, monitoring and most importantly, security. And eureka as a service discovery platform that allows you to load balance (in Linux terms the nginx or haproxy) and fail over between your service instances.
Typically the backend services that perform the server side business operations (i.e. core) are not exposed publicly due to many reasons. They are shielded by some Gateway layer that also serves as reverse-proxy. Netflix Zuul serves as this gateway layer which easily gives you the capabilities as mentioned by #Apollo and here

Resources