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

[gateway] API Gateway doesn't failover for all connection failures #754

Closed
YaytayAtWork opened this Issue Aug 29, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@YaytayAtWork

YaytayAtWork commented Aug 29, 2017

Expected Behavior

Given an API with two endpoints, if one of the endpoints is down the gateway doesn't always failover to the other one.

This happens when the server hosting the endpoint is up, but the target service is not listening on the endpoint (i.e. when a docker image isn't running).
The server returns an immediate ICMP packet and this is reported to the gateway as:
ERROR i.g.g.http.vertx.VertxHttpClient - Server proxying failed: No route to host: srv-blah.blah.com/172.28.128.233:9000

Current Behavior

A 502 error is returned.
VertxHttpClient.java:98
The failover explicitly only works for timeout failures.

Possible Solution

I think the failover behaviour should be invoked for any I/O error that prevents a connection being established.

Steps to Reproduce (for bugs)

  1. Set up an API with two endpoints, configured for failover pointing to a single target server.
  2. One of the endpoints should be fully operational, the other should be down.
  3. Make a number of requests to the API.
  4. Some requests will succeed (thanks to round robin) and some will fail (thanks to this issue).
    The correct behaviour would be for all requests to succeed.

Your Environment

  • Version used: graviteeio-full-1.8.3
  • Operating System and version: CentOS 7.
  • JDK: jdk1.8.0_141

@brasseld brasseld changed the title from Gateway doesn't failover for all connection failures to [gateway] API Gateway doesn't failover for all connection failures Aug 29, 2017

@brasseld brasseld self-assigned this Sep 1, 2017

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Sep 12, 2017

@brasseld brasseld added this to the 1.9.0 milestone Sep 12, 2017

@NicolasGeraud NicolasGeraud removed this from the 1.9.0 milestone Sep 13, 2017

@NicolasGeraud NicolasGeraud added this to the 1.10.0 milestone Oct 6, 2017

@NicolasGeraud NicolasGeraud removed this from the 1.10.0 milestone Oct 6, 2017

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Oct 6, 2017

this issue is resolved via #786

@NicolasGeraud NicolasGeraud added this to the 1.10.0 milestone Oct 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment