swindon
swindon copied to clipboard
Dynamic routing take 1
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
Probably destintation: verwalter/.... would look more consistent than url:.
Updated
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.