Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid calling down service in load balancer option #1041

Open
uvcreation opened this issue Oct 17, 2019 · 14 comments
Open

How to avoid calling down service in load balancer option #1041

uvcreation opened this issue Oct 17, 2019 · 14 comments
Labels
accepted Bug or feature would be accepted as a PR or is being worked on bug Identified as a potential bug Health Check POC Health Checks help wanted Not actively being worked on. If you plan to contribute, please drop a note. high High priority Load Balancer Ocelot feature: Load Balancer medium effort Likely a few days of development effort QoS Ocelot feature: Quality of Service

Comments

@uvcreation
Copy link

uvcreation commented Oct 17, 2019

Expected Behavior / New Feature

Load balancer should able to recognize the down service and stop calling service or up the service.

Actual Behavior / Motivation for New Feature

Load balancer is calling the service although the service is down and returning 500 internal server on every call.

Steps to Reproduce the Problem

  1. Created two instance of the same module and run on different port.
  2. Added load balance option for those two service instance of type RoundRobin.
  3. Kill the second service and now Ocelot still redirect to down service.

Specifications

  • Version: 13.5.2
  • Platform: Windows 10
  • Subsystem:
@catcherwong
Copy link
Contributor

Maybe you should use Service Discovery to solve this problem.

@uvcreation
Copy link
Author

@catcherwong Is it possible without Service Discovery?

@catcherwong
Copy link
Contributor

catcherwong commented Oct 17, 2019

Without Service Discovery, you should remove the down service from the configuration by yourself.

Or you can set QoSOptions to ensure the quality of service.

https://ocelot.readthedocs.io/en/latest/features/qualityofservice.html

@uvcreation
Copy link
Author

@catcherwong Thanks for your prompt reply but I don't think it will solved my problem.
A QoS will just manipulate the status code to 503 from 500 but I want the Ocelot should able to UP the down service.

Do you know any other open source "API Gateway" which could help me with this situation?

@catcherwong
Copy link
Contributor

catcherwong commented Oct 17, 2019

A QoS will just manipulate the status code to 503 from 500 but I want the Ocelot should able to UP the down service.

Do you want to start up a down service via Ocelot?

Ocelot just forwards the requests to the downstream service.

If a service is not working properly, Ocelot can stop calling or enable CircuitBreaker to reduce the pressure on this service.

But Ocelot can not restore a down service to normal service.

@uopeydel
Copy link

uopeydel commented Dec 9, 2019

Have any way to skip DownstreamHostAndPorts is not work? I have 5 port in DownstreamHostAndPorts and port at index 4 or else is not work(service stop by any problem). I need to let it skip that index automatically.

@raman-m raman-m added the QoS Ocelot feature: Quality of Service label Oct 25, 2023
@raman-m raman-m added accepted Bug or feature would be accepted as a PR or is being worked on Load Balancer Ocelot feature: Load Balancer bug Identified as a potential bug help wanted Not actively being worked on. If you plan to contribute, please drop a note. medium effort Likely a few days of development effort labels Jan 21, 2024
@raman-m
Copy link
Member

raman-m commented Jan 21, 2024

@uvcreation commented on Oct 17, 2019
Hi Uttam!


@catcherwong Thanks for your prompt reply but I don't think it will solved my problem.
A QoS will just manipulate the status code to 503 from 500 but I want the Ocelot should able to UP the down service.

Sorry! And this issue will be fixed as a part of #1513
Do you like status 503 in QoS or not?


Do you know any other open source "API Gateway" which could help me with this situation?

You could try awesome lite .NET gateway with the name ProxyKit 😉 ...which is in Archive 🤣
But, come on! Why not to stay with Ocelot? 🐯

@raman-m raman-m added the Health Check POC Health Checks label Mar 16, 2024
@raman-m
Copy link
Member

raman-m commented Mar 16, 2024

Hello, community! Here is more news:

@raman-m raman-m added the high High priority label Mar 16, 2024
@raman-m
Copy link
Member

raman-m commented Mar 16, 2024

@catcherwong commented on Oct 17, 2019:

Maybe you should use Service Discovery to solve this problem.

Yes, Consul has health checks feature: Define health checks
Use service discovery by our Consul provider package.

@raman-m
Copy link
Member

raman-m commented Mar 16, 2024

@uvcreation commented on Oct 17, 2019:

@catcherwong Is it possible without Service Discovery?

Impossible! What you need is Health Check feature. This feature is not implemented in Ocelot.
We will prioritize the feature development, but any help and opened PRs are welcome!

@raman-m
Copy link
Member

raman-m commented Mar 16, 2024

@ggnaegi @RaynaldM
I've assigned high priority to this issue. Because there is no open PR at all, I have no idea when we can start development of Health Checks...
I will add to March'24 milestone but I'm not sure about our team capacity.

@raman-m raman-m added the Spring'24 Spring 2024 release label Mar 16, 2024
@raman-m raman-m added this to the March'24 milestone Mar 16, 2024
@RaynaldM
Copy link
Collaborator

Ocelot is a package that brings Gateway functionality to an asp.net core application.
I believe that all the natural decorum of an asp.net core application (healthCheck, Cors, StaticFiles, etc...) is the responsibility of the developer and should not be included in the Ocelot package.

@raman-m
Copy link
Member

raman-m commented Mar 25, 2024

@ggnaegi Your opinion, Gui?

@raman-m raman-m added Oct'24 October 2024 release and removed Spring'24 Spring 2024 release labels May 9, 2024
@raman-m raman-m removed this from the March-April'24 milestone May 9, 2024
@raman-m raman-m added this to the May-June'24 milestone May 9, 2024
@raman-m raman-m modified the milestones: Summer'24, Annual 2023 Jun 15, 2024
@raman-m raman-m removed the Oct'24 October 2024 release label Oct 26, 2024
@raman-m raman-m removed this from the October'24 milestone Oct 26, 2024
@raman-m
Copy link
Member

raman-m commented Oct 26, 2024

Unpredictable delivery!

Delivery after upgrade to NET 9 framework ❗

There is no team capacity to develop the feature in 2024...

@raman-m raman-m pinned this issue Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Bug or feature would be accepted as a PR or is being worked on bug Identified as a potential bug Health Check POC Health Checks help wanted Not actively being worked on. If you plan to contribute, please drop a note. high High priority Load Balancer Ocelot feature: Load Balancer medium effort Likely a few days of development effort QoS Ocelot feature: Quality of Service
Projects
None yet
Development

No branches or pull requests

5 participants