https://github.com/stylepatrick/spring-cloud-eureka-load-balancer
Spring Cloud Eureka with one feign-client, one spring-cloud-gateway, one gateway-client and two servers with ribbon load balancer. Spring Security used for authentication.
https://github.com/stylepatrick/spring-cloud-eureka-load-balancer
netflix-eureka spring-actuator spring-boot spring-cloud spring-cloud-gateway spring-retry spring-security
Last synced: 2 months ago
JSON representation
Spring Cloud Eureka with one feign-client, one spring-cloud-gateway, one gateway-client and two servers with ribbon load balancer. Spring Security used for authentication.
- Host: GitHub
- URL: https://github.com/stylepatrick/spring-cloud-eureka-load-balancer
- Owner: stylepatrick
- License: mit
- Created: 2022-03-31T16:38:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-01T18:30:50.000Z (over 3 years ago)
- Last Synced: 2025-03-21T11:22:46.165Z (7 months ago)
- Topics: netflix-eureka, spring-actuator, spring-boot, spring-cloud, spring-cloud-gateway, spring-retry, spring-security
- Language: Java
- Homepage:
- Size: 71.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spring-cloud-eureka-load-balancer
The project consists of:
- **an eureka-discovery-service (multiple replicas are possible) -> 8761**
- **feign-client -> 8080**
- **cloud-gateway -> 8282**
- **gateway-client -> 8081**
- **two servers (provides the same API) -> 71, 72**Everything is secured by basic auth with spring-security.
The feign-client contacts one of the two servers via the eureka-discovery-service, depending on the ribbon load balancer.
If one request fails (server goes offline, etc.), spring-retry will contact the next one. Client will not see any fail response.A cloud-gateway and gateway-client is available to demonstrate how the load balancing could work, without having a feign-client.
The gateway-client does not need to part of the eureka-discovery-service and should simulate an external client, who access the servers over the cloud-gateway.
Also here spring-retry is used to contact the next server if the first request fails.Actuator endpoint /info and /health is open, metrics are secured by spring-security.