swindon icon indicating copy to clipboard operation
swindon copied to clipboard

Dynamic routing take 1

Open tailhook opened this issue 8 years ago • 3 comments

As the step one we just fetch addresses from external source:

http-destinations:
  my-application:
    addresses: !JsonRequest verwalter/v1/schedule?key=data.roles.my-application.all_backends
  verwalter:
    addresses:
    - localhost:8379

More comprehensive settings might look like:

htttp-destinations:
  my-application:
    addresses: !JsonRequest
      destination: verwalter/v1/schedule
      query-string: "key=data.roles.my-application.all_backends"
      refresh-interval: 10 seconds

Technically, as we support changing addresses on the fly anyway this should be relatively easy to implement.

/cc @popravich

tailhook avatar May 26 '17 12:05 tailhook

Probably destintation: verwalter/.... would look more consistent than url:.

popravich avatar May 26 '17 12:05 popravich

Updated

tailhook avatar May 26 '17 12:05 tailhook

Well, after some thinking, I don't want any special tags on addresses:, I think we should implement configurable name service, with some .verwalter suffix resolved via verwalter's API.

Keeping this issue open, until issue on name resolution is created.

tailhook avatar Jun 21 '17 15:06 tailhook