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

Administrative state for routing objects #518

Closed
mikkokar opened this issue Nov 5, 2019 · 0 comments
Closed

Administrative state for routing objects #518

mikkokar opened this issue Nov 5, 2019 · 0 comments
Assignees
Labels
P2 Plan

Comments

@mikkokar
Copy link
Contributor

mikkokar commented Nov 5, 2019

Description

The origins toggle doesn't work in the backwards compatibility mode (#458). Implement a mechanism to substitute this functionality. The origins toggle is described here:

More fundamentally, the routing objects, especially the HostProxy objects, should have an administrative state:

  • Enabled (administrator enabled)
  • Disabled (administrator disabled)

Each HostProxy object, or any other object that needs to participate as a load balancing group member, will be tagged with a tag indicating the administrative state.

I propose the following naming convention:

  • state: enabled - the object is administratively enabled
  • state: disabled - the object is administratively disabled
  • status: active - the object is marked active by the health checking function
  • status: inactive - the object is marked inactive by the health checking function

The load balancing group will include all objects that are tagged with both state: enabled and status: active. All other objects are excluded by the load balancer.

Admin Interface

The origins state is administered via admin interface endpoint.

I propose the following

POST to /admin/providers/<provider-name>/<app-id>/<origin-id>/state with property state either enabled or disabled will enable/disable the object as requested.

GET to /admin/providers/<provider-name>/<app-id>/<origin-id>/state will return the current object state.

Implementation considerations

This feature needs to be provided by YamlFileConfigurationService and it should expose it via adminInterfaceHandlers method that can be overridden from StyxService interface.

This functionality can be, but doesn't have to be bridged to the original /admin/tasks/origins endpoint.

Acceptance Criteria

  • LoadBalancingGroup chooses only those objects that are both administratively enabled, and `active.
  • Health check monitor should not monitor disabled object.
  • Health check monitor state shouldn't encode its internal state (pass/fail count) in the state tag. Instead, it can encode it to some other tag.
  • Document the tagging scheme and the two new endpoints in Styx user documentation.
@mikkokar mikkokar changed the title Enable/disable origin in routing object backwards compatibility mode Administrative state for routing objects Nov 5, 2019
@chrisgresty chrisgresty self-assigned this Nov 6, 2019
@mikkokar mikkokar added the P2 Plan label Nov 11, 2019
mikkokar pushed a commit that referenced this issue Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Plan
Projects
None yet
Development

No branches or pull requests

2 participants