Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions dev_guide/routes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -288,22 +288,20 @@ router which endpoint is handling the session, ensuring that client requests use
the cookie so that they are routed to the same pod.

You can set a cookie name to overwrite the default, auto-generated one for the
route. This allows the application receiving route traffic to know the cookie
name. By deleting the cookie it can force the next request to re-choose an
route. By deleting the cookie it can force the next request to re-choose an
endpoint. So, if a server was overloaded it tries to remove the requests from the
client and redistribute them.

. Annotate the route with the desired cookie name:
+
----
$ oc annotate route <route_name> router.openshift.io/<cookie_name>="-<cookie_annotation>"
$ oc annotate route <route_name> router.openshift.io/cookie_name="<your_cookie_name>"
----
+
For example, to annotate the cookie name of `my_cookie` to the `my_route` with
the annotation of `my_cookie_anno`:
For example, to specify `my_cookie` as your new cookie name:
+
----
$ oc annotate route my_route router.openshift.io/my_cookie="-my_cookie_anno"
$ oc annotate route my_route router.openshift.io/cookie_name="my_cookie"
----

. Save the cookie, and access the route:
Expand Down