Azure-Samples / java-microservices-aca-lab

Spring Petclinic Microservices with AI on Azure Container Apps
https://aka.ms/aca-lab
MIT License
7 stars 31 forks source link

Fix: visits-service scale down to one, not zero #103

Closed haoozhang closed 1 month ago

haoozhang commented 1 month ago

Purpose

If visits-service scales down to zero, we will meet the error 503 Service Unavailable when calling it via api-gateway. This is because that the spring cloud gateway internally use Eureka Service Discovery to discover the instance. When scaled to zero, it will be considered as no such instance.

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

What to Check

Verify that the following are valid

Other Information