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

Add hash_on cookie load balancing docs #726

Closed
wants to merge 7 commits into from

Conversation

jtschulz
Copy link

Summary

Add documentation for new feature in kong admin API

`hash_on`<br>*optional* | What to use as hashing input: `none`, `consumer`, `ip`, or `header` (defaults to `none` resulting in a weighted-round-robin scheme).
`hash_fallback`<br>*optional* | What to use as hashing input if the primary `hash_on` does not return a hash (eg. header is missing, or no consumer identified): `none`, `consumer`, `ip`, or `header` (defaults to `none`).
`hash_on`<br>*optional* | What to use as hashing input: `none`, `consumer`, `ip`, `header`, or `cookie` (defaults to `none` resulting in a weighted-round-robin scheme).
`hash_fallback`<br>*optional* | What to use as hashing input if the primary `hash_on` does not return a hash (eg. header is missing, or no consumer identified). Not availble if `hash_on` is `cookie`. One of: `none`, `consumer`, `ip`, `header`, or `cookie` (defaults to `none`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd turn the clauses around (and a typo in available)

One of: none, consumer, ip, header, or cookie (defaults to none, not available if hash_on is set to cookie).

`hash_on_header`<br>*semi-optional* | The header name to take the value from as hash input (only required when `hash_on` is set to `header`).
`hash_fallback_header`<br>*semi-optional* | The header name to take the value from as hash input (only required when `hash_fallback` is set to `header`).
`hash_on_cookie`<br>*semi-optional* | The cookie name to take the value from as hash input (only required when `hash_on` is set to `cookie`) If the specified cookie is not in the request, the response will set a value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add hash fallback (and add a dot)

when either hash_on or hash_on_fallback is set to `cookie.

last part is a bit awkward

If the specified cookie is not in the request, a value will be generated and set in the response.

`hash_on_header`<br>*semi-optional* | The header name to take the value from as hash input (only required when `hash_on` is set to `header`).
`hash_fallback_header`<br>*semi-optional* | The header name to take the value from as hash input (only required when `hash_fallback` is set to `header`).
`hash_on_cookie`<br>*semi-optional* | The cookie name to take the value from as hash input (only required when `hash_on` is set to `cookie`) If the specified cookie is not in the request, the response will set a value.
`hash_on_cookie_path`<br>*semi-optional* | The cookie path to set in the response headers (only required when `hash_on` is set to `cookie`, defaults to `"/"`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as comment above

`hash_fallback_cookie` field) with a specified path (in the `hash_on_cookie_path`
field, default `"/"`) as input for the hash. If the cookie is not present in the
request, it will be set by the response, hence the `hash_on_fallback` setting is
invalid if `cookie` is the primary hashing mechanism.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hash_fallback_cookie field no longer exists

@jtschulz jtschulz force-pushed the release/ce-0.14.0 branch from f423dbf to 318b14c Compare May 30, 2018 14:42
@jtschulz
Copy link
Author

Thanks @Tieske . Fixed those (and tweaked phrasing in a few other places).

All references to the API entity must be sent to the 0.13.x version of
the Admin API reference.

Signed-off-by: Thibault Charbonnier <[email protected]>
`hash_on_header`<br>*semi-optional* | The header name to take the value from as hash input (only required when `hash_on` is set to `header`).
`hash_fallback_header`<br>*semi-optional* | The header name to take the value from as hash input (only required when `hash_fallback` is set to `header`).
`hash_on_cookie`<br>*semi-optional* | The cookie name to take the value from as hash input (only required when `hash_on` or `hash_fallback` is set to `cookie`). If the specified cookie is not in the request, Kong will generate a value and set in the response.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and set in the response.

not proper?

@Tieske
Copy link
Member

Tieske commented May 31, 2018

seems it also needs some conflicts to be resolved

@jtschulz jtschulz force-pushed the release/ce-0.14.0 branch from 784c0fa to c918932 Compare May 31, 2018 19:59
@jtschulz
Copy link
Author

I had tried to resolve the conflicts in the github UI, but the merge looked funny. Cleaned the commit history up and addressed that last comment.

@Tieske
Copy link
Member

Tieske commented Jun 1, 2018

@hishamhm @thibaultcha either of you want to review and merge?

@thibaultcha
Copy link
Member

I will take a look, always; there is no rush since this is scheduled for 0.14 which we will be picking a date for.

@thibaultcha thibaultcha force-pushed the release/ce-0.14.0 branch 4 times, most recently from 9619ca5 to 51808cc Compare June 28, 2018 21:29
@thibaultcha
Copy link
Member

Manually merged, thank you @PepperTeasdale!

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

Successfully merging this pull request may close these issues.

5 participants