diff --git a/_data/sidebar.yml b/_data/sidebar.yml index 51f0796b85..597c439e23 100644 --- a/_data/sidebar.yml +++ b/_data/sidebar.yml @@ -358,8 +358,6 @@ docs: url: /en/reference/services-http.html - page: services.xml - processing url: /en/reference/services-processing.html - - page: services.xml - routing - url: /en/reference/services-routing.html - page: services.xml - search url: /en/reference/services-search.html - page: hosts.xml diff --git a/en/operations-selfhosted/routing.html b/en/operations-selfhosted/routing.html index 4839052425..f3f8286643 100644 --- a/en/operations-selfhosted/routing.html +++ b/en/operations-selfhosted/routing.html @@ -4,6 +4,7 @@ redirect_from: - /documentation/routing.html - /en/routing.html +- /en/reference/services-routing.html ---
@@ -17,11 +18,11 @@
There are other, more in-depth, articles on routing:
ConfigId
as their host's symbolic name.
-See vespa-route for how to inspect this,
-or use the config API.
+See vespa-route for how to inspect this,
+or use the config API.
A hop can be prefixed using the special character "?" to force it to behave as if its -ignore-result attribute was configured to "true". +ignore-result attribute was configured to "true".
@@ -156,7 +157,7 @@-Refer to the routing policy reference. +Refer to the routing policy reference.
@@ -170,7 +171,7 @@This hop has a selector but no recipients. The reason for this is best explained in -the policies article, +the policies article, but it serves as an example of a hop that has no configured recipients. Notice how the policy directive contains a colon (":") which denotes that the remainder of the directive is a parameter to the policy constructor. @@ -233,7 +234,7 @@
If the resolution of a recipient passed through a hop that was configured -to ignore results, +to ignore results, the network layer will reply immediately with a synthetic "OK".
@@ -366,3 +367,296 @@Refer to the Document API JavaDoc.
+ + + + ++ This is the reference documentation for all elements in + the routing section of services.xml. +
++routing [version] + routingtable [protocol, verify] + route [name, hops] + hop [name, selector, ignore-result] + recipient [session] + services [protocol] + service [name] ++ + + +
+ Contained in services. + The container element for all configuration related to routing. +
+Attribute | Required | Value | Default | Description |
---|---|---|---|---|
version | +required | +number | ++ | Must be set to "1.0" in this Vespa-version |
Optional subelements:
+Example:
++<routing version="1.0"> + <routingtable protocol="document"> + <route name="route1" hops="hop1 hop2" /> + <route name="route2" hops="hop3 hop4 hop5" /> + <hop name="hop1" selector="docproc/cluster.foo/docproc/*/feed-processor"> + <recipient session="docproc/cluster.foo/docproc/*/feed-processor" /> + </hop> + <hop name="hop2" selector="search/cluster.bar/[SearchGroup]/[SearchRow]/[SearchColumn]/feed-destination"> + <recipient session="search/cluster.bar/g0/c0/r0/feed-destination" /> + <recipient session="search/cluster.bar/g0/c1/r0/feed-destination" /> + <recipient session="search/cluster.bar/g0/c0/r1/feed-destination" /> + <recipient session="search/cluster.bar/g0/c1/r1/feed-destination" /> + <recipient session="search/cluster.bar/g1/c0/r0/feed-destination" /> + <recipient session="search/cluster.bar/g1/c1/r0/feed-destination" /> + <recipient session="search/cluster.bar/g1/c0/r1/feed-destination" /> + <recipient session="search/cluster.bar/g1/c1/r1/feed-destination" /> + </hop> + </routingtable> + <services protocol="document"> + <service name="foo/bar" /> + </services> +</routing> ++ + + +
+ Contained in routing. + Specifies a routing table for a specific protocol. +
+Attribute | Required | Value | Default | Description |
---|---|---|---|---|
protocol | +required | ++ | + | Configure which protocol to use. + Only the protocol document is defined, + so if you define a routing table for an unsupported protocol, + the application will just log an INFO entry that contains the name of that protocol. |
verify | +optional | +boolean | ++ | ToDo: document this |
Optional subelements:
+ +Example:
++<routing version="1.0"> + <routingtable protocol="document"> + <route name="route1" hops="hop1 hop2" /> + <hop name="hop1" selector="docproc/cluster.foo/docproc/*/feed-processor"> + <recipient session="docproc/cluster.foo/docproc/*/feed-processor" /> + </hop> + </routingtable> +</routing> ++ + + +
+ Contained in routingtable. + Specifies a route for a message to its destination through a set of intermediate hops. + If at least one hop in a route does not exist, + the application will fail to start and issue an error that contains the name of that hop. +
+Attribute | Required | Value | Default | Description |
---|---|---|---|---|
name | +required | ++ | + | Route name. |
hops | +required | ++ | + | A whitespace-separated list of hop names, where each name must be a valid hop. |
Subelements: none
+Example:
++<routing version="1.0"> + <routingtable protocol="document"> + <route name="route1" hops="hop1 hop2" /> + <route name="route2" hops="hop3 hop4 hop5" /> + </routingtable> +</routing> ++ + + +
+ Contained in routingtable. + Specifies a single hop that can be used to construct one or more routes. + A hop must have a name that is unique within the routing table to which it belongs. + A hop contains a selector string and a list of recipient sessions. +
+Attribute | Required | Value | Default | Description |
---|---|---|---|---|
name | +required | ++ | + | Hop name. |
selector | +required | ++ | + | Selector string. |
ignore-result | +optional | ++ | + | If set to true, specifies that the result of routing through that hop should be ignored. |
Optional subelements:
+Example:
++<routing version="1.0"> + <routingtable protocol="document"> + <hop name="hop1" selector="docproc/cluster.foo/docproc/*/feed-processor"> + <recipient session="docproc/cluster.foo/docproc/*/feed-processor" /> + </hop> + </routingtable> +</routing> ++ + + +
+ Contained in hop. + Specifies a recipient session of a hop. +
+Attribute | Required | Value | Default | Description |
---|---|---|---|---|
session | +required | ++ | + | This attribute must correspond to a running instance of a + service that can be routed to. + All session identifiers consist of a location part and a + name. A search node is always given a session name on the form + search/cluster.name/g#/r#/c#/feed-destination, + whereas a document processor service is always named + docproc/cluster.name/docproc/#/feed-processor. |
Subelements: none
+Example:
++<routing version="1.0"> + <routingtable protocol="document"> + <hop name="search/cluster.music" selector="search/cluster.music/[SearchGroup]/[SearchRow]/[SearchColumn]/feed-destination"> + <recipient session="search/cluster.music/g0/c0/r0/feed-destination" /> + <recipient session="search/cluster.music/g0/c0/r1/feed-destination" /> + <recipient session="search/cluster.music/g1/c0/r0/feed-destination" /> + <recipient session="search/cluster.music/g1/c0/r1/feed-destination" /> + </hop> + </routingtable> +</routing> ++ + + +
+ Contained in routing. + Specifies a set of services available for a specific protocol. + At the moment the only supported protocol is document. + The services specified are used by the route verification step + to allow hops and routes to reference services known to exist, + but that can not be derived from services.xml. +
+Attribute | Required | Value | Default | Description |
---|---|---|---|---|
protocol | +required | ++ | + | Configure which protocol to use. Only the protocol document is defined. |
Optional subelements:
+Example:
++<routing version="1.0"> + <services protocol="document"> + <service name="foo/bar" /> + </services> +</routing> ++ + + +
+ Contained in services. + Specifies a single known service that can not be derived from the services.xml. +
+Attribute | Required | Value | Default | Description |
---|---|---|---|---|
name | +required | ++ | + | The name of the service. |
Subelements: none
+Example:
++<routing version="1.0"> + <services protocol="document"> + <service name="foo/bar" /> + </services> +</routing> +diff --git a/en/reference/services.html b/en/reference/services.html index f20ecd9198..40ae918a57 100644 --- a/en/reference/services.html +++ b/en/reference/services.html @@ -13,7 +13,7 @@ container [version] content [version] admin [version] - routing [version] + routing [version] Nodes/hosts referred to in services.xml must be defined in hosts.xml using hostalias. @@ -41,7 +41,7 @@
admin
content
container
routing
routing
Example:
@@ -101,5 +101,5 @@Modular Configuration
will be used as if it was inlined in services.xml. This is supported for search chains, docproc chains and -routing tables. +routing tables.