- Microservices Pattern – Shared Data - February 21, 2021
- Event Sourcing – Data Integrity - January 23, 2021
- CQRS ( Command Query Responsibility Seggregation) - January 8, 2021
Zuul
Zuul is an edge service that provides dynamic routing, monitoring, resiliency, security, and more. Please view the wiki for usage, information.
Consul
Consul is a distributed service mesh to connect, secure, and configure services across any runtime platform and public or private cloud.
Load balancing of microservices is one of the major aspects in microservices world. Our problem statement was that we must load balance our applications and if any services are down than we need to deregister that service that’s why we have used consul as we are already using consul as for dynamic property management.
Integrating Consul with Zuul
Prerequisites:
- Eclipse or any other dev tool
- Maven
- Consul
Set Up of Services
Launch Consul:
We have set up consul running at localhost:8500
We have developed a student service which is running on server 9870, 9871, 9872 port and all these services are registered on consul with service name as student services
Lets start out zuul application
Zuul app is registered on consul
Provide the following configuration in application.yml file of your zuul application
Let’s test our application
We test our app with actual port services are working fine.
Code is available here –
https://bitbucket.org/vermaankit84/zuul-webapp/src/master/
Please share your feedback.