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

Non-Redirected Service Split Uses a Gateway unnecessarily #6085

Closed
mkeeler opened this issue Jul 6, 2019 · 0 comments
Closed

Non-Redirected Service Split Uses a Gateway unnecessarily #6085

mkeeler opened this issue Jul 6, 2019 · 0 comments
Milestone

Comments

@mkeeler
Copy link
Member

mkeeler commented Jul 6, 2019

Using the terraform code here: https://github.com/mkeeler/consul-docker-test/tree/master/mesh-gateways-l7

It sets up the following configuration entries

Kind = "proxy-defaults"
Name = "global"
Config {
  local_connect_timeout_ms = 1000
  handshake_timeout_ms = 10000
}
MeshGateway {
  Mode = "local"
}
Kind = "service-defaults"
Name = "api"
protocol = "http"
Kind = "service-defaults"
Name = "api-v2"
protocol = "http"
Kind = "service-defaults"
Name = "web"
protocol = "http"
Kind = "service-resolver"
Name = "api"
Subsets {
  v1 {
    Filter = "Service.Meta.version == 1"
  }
  v2 {
    Filter = "Service.Meta.version == 2"
  }
}
Kind = "service-resolver"
Name = "api-v2"
Redirect {
  Service = "api"
  ServiceSubset = "v2"
  Datacenter = "secondary"
}
Subsets {
  v1 {
    Filter = "Service.Meta.version == 1"
  }
  v2 {
    Filter = "Service.Meta.version == 2"
  }
}
Kind = "service-splitter"
Name = "api"
Splits = [
  {
    Weight = 90
    ServiceSubset = "v1"
  },
  {
    Weight = 10
    Service = "api-v2"
  },
]

Everything technically works but the both the v1 subset split and api-v2 service split end up being routed towards the gateway involved.

It would be desirable for the v1 service subset to be sent directly to the instance in the primary dc instead of going through the gateway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant