|
| 1 | +--- |
| 2 | +title: "Rasterendpunkte" |
| 3 | +weight: 4 |
| 4 | +--- |
| 5 | + |
| 6 | +{{% notice info %}} |
| 7 | +<i class="fas fa-language"></i> Diese Seite wird von Englisch |
| 8 | +auf Deutsch übersetzt. Sprichst Du Deutsch? Hilf uns die Seite |
| 9 | +zu übersetzen indem Du uns einen Pull Reqeust schickst! |
| 10 | +{{% /notice %}} |
| 11 | + |
| 12 | + |
| 13 | +## Grid |
| 14 | + |
| 15 | +### Grid Status |
| 16 | + |
| 17 | +Grid status provides the current state of the Grid. It consists of details about every registered Node. |
| 18 | +For every Node, the status includes information regarding Node availability, sessions, and slots. |
| 19 | + |
| 20 | +```shell |
| 21 | +cURL GET 'http://localhost:4444/status' |
| 22 | +``` |
| 23 | + |
| 24 | +In the Standalone mode, the Grid URL is the Standalone server address. |
| 25 | + |
| 26 | +In the Hub-Node mode, the Grid URL is the Hub server address. |
| 27 | + |
| 28 | +In the fully distributed mode, the Grid URL is the Router server address. |
| 29 | + |
| 30 | +Default URL for all the above modes is http://localhost:4444. |
| 31 | + |
| 32 | +## Distributor |
| 33 | + |
| 34 | +### Remove Node |
| 35 | + |
| 36 | +To remove the Node from the Grid, use the cURL command enlisted below. |
| 37 | +It does not stop any ongoing session running on that Node. |
| 38 | +The Node continues running as it is unless explicitly killed. |
| 39 | +The Distributor is no longer aware of the Node and hence any matching new session request |
| 40 | +will not be forwarded to that Node. |
| 41 | + |
| 42 | +In the Standalone mode, the Distributor URL is the Standalone server address. |
| 43 | + |
| 44 | +In the Hub-Node mode, the Distributor URL is the Hub server address. |
| 45 | +```shell |
| 46 | +cURL --request DELETE 'http://localhost:4444/se/grid/distributor/node/<node-id>' --header 'X-REGISTRATION-SECRET: <secret> ' |
| 47 | +``` |
| 48 | +In the fully distributed mode, the URL is the Distributor server address. |
| 49 | +```shell |
| 50 | +cURL --request DELETE 'http://localhost:5553/se/grid/distributor/node/<node-id>' --header 'X-REGISTRATION-SECRET: <secret>' |
| 51 | +``` |
| 52 | +If no registration secret has been configured while setting up the Grid, then use |
| 53 | +```shell |
| 54 | +cURL --request DELETE 'http://<Distributor-URL>/se/grid/distributor/node/<node-id>' --header 'X-REGISTRATION-SECRET;' |
| 55 | +``` |
| 56 | + |
| 57 | +### Drain Node |
| 58 | + |
| 59 | +Node drain command is for graceful node shutdown. |
| 60 | +Draining a Node stops the Node after all the ongoing sessions are complete. |
| 61 | +However, it does not accept any new session requests. |
| 62 | + |
| 63 | +In the Standalone mode, the Distributor URL is the Standalone server address. |
| 64 | + |
| 65 | +In the Hub-Node mode, the Distributor URL is the Hub server address. |
| 66 | +```shell |
| 67 | +cURL --request POST 'http://localhost:4444/se/grid/distributor/node/<node-id>/drain' --header 'X-REGISTRATION-SECRET: <secret> ' |
| 68 | +``` |
| 69 | +In the fully distributed mode, the URL is the Distributor server address. |
| 70 | +```shell |
| 71 | +cURL --request POST 'http://localhost:5553/se/grid/distributor/node/<node-id>/drain' --header 'X-REGISTRATION-SECRET: <secret>' |
| 72 | +``` |
| 73 | +If no registration secret has been configured while setting up the Grid, then use |
| 74 | +```shell |
| 75 | +cURL --request POST 'http://<Distributor-URL>/se/grid/distributor/node/<node-id>/drain' --header 'X-REGISTRATION-SECRET;' |
| 76 | +``` |
| 77 | + |
| 78 | +## Node |
| 79 | + |
| 80 | +The endpoints in this section are applicable for Hub-Node mode and fully distributed Grid mode where the |
| 81 | +Node runs independently. |
| 82 | +The default Node URL is http://localhost:5555 in case of one Node. |
| 83 | +In case of multiple Nodes, use [Grid status](#grid-status) to get all Node details and locate the Node address. |
| 84 | + |
| 85 | +### Status |
| 86 | + |
| 87 | +The Node status is essentially a health-check for the Node. |
| 88 | +Distributor pings the node status are regular intervals and updates the Grid Model accordingly. |
| 89 | +The status includes information regarding availability, sessions, and slots. |
| 90 | + |
| 91 | +```shell |
| 92 | +cURL --request GET 'http://localhost:5555/status' |
| 93 | +``` |
| 94 | + |
| 95 | +### Drain |
| 96 | + |
| 97 | +Distributor passes the [drain](#drain-node) command to the appropriate node identified by the node-id. |
| 98 | +To drain the Node directly, use the cuRL command enlisted below. |
| 99 | +Both endpoints are valid and produce the same result. Drain finishes the ongoing sessions before stopping the Node. |
| 100 | + |
| 101 | +```shell |
| 102 | +cURL --request POST 'http://localhost:5555/se/grid/node/drain' --header 'X-REGISTRATION-SECRET: <secret>' |
| 103 | +``` |
| 104 | +If no registration secret has been configured while setting up the Grid, then use |
| 105 | +```shell |
| 106 | +cURL --request POST 'http://<node-URL>/se/grid/node/drain' --header 'X-REGISTRATION-SECRET;' |
| 107 | +``` |
| 108 | + |
| 109 | +### Check session owner |
| 110 | + |
| 111 | +To check if a session belongs to a Node, use the cURL command enlisted below. |
| 112 | + |
| 113 | +```shell |
| 114 | +cURL --request GET 'http://localhost:5555/se/grid/node/owner/<session-id>' --header 'X-REGISTRATION-SECRET: <secret>' |
| 115 | +``` |
| 116 | +If no registration secret has been configured while setting up the Grid, then use |
| 117 | +```shell |
| 118 | +cURL --request GET 'http://<bode-URL>/se/grid/node/owner/<session-id>' --header 'X-REGISTRATION-SECRET;' |
| 119 | +``` |
| 120 | + |
| 121 | +It will return true if the session belongs to the Node else it will return false. |
| 122 | + |
| 123 | +### Delete session |
| 124 | + |
| 125 | +Deleting the session terminates the WebDriver session, quits the driver and removes it from the active sessions map. |
| 126 | +Any request using the removed session-id or reusing the driver instance will throw an error. |
| 127 | + |
| 128 | +```shell |
| 129 | +cURL --request DELETE 'http://localhost:5555/se/grid/node/session/<session-id>' --header 'X-REGISTRATION-SECRET: <secret>' |
| 130 | +``` |
| 131 | +If no registration secret has been configured while setting up the Grid, then use |
| 132 | +```shell |
| 133 | +cURL --request DELETE 'http://<node-URL>/se/grid/node/session/<session-id>' --header 'X-REGISTRATION-SECRET;' |
| 134 | +``` |
| 135 | + |
| 136 | +## New Session Queue |
| 137 | + |
| 138 | +### Clear New Session Queue |
| 139 | + |
| 140 | +New Session Request Queue holds the new session requests. |
| 141 | +To clear the queue, use the cURL command enlisted below. |
| 142 | +Clearing the queue rejects all the requests in the queue. For each such request, the server returns an error response to the respective client. |
| 143 | +The result of the clear command is the total number of deleted requests. |
| 144 | + |
| 145 | +In the Standalone mode, the queuer URL is the Standalone server address. |
| 146 | + |
| 147 | +In the Hub-Node mode, the queuer URL is the Hub server address. |
| 148 | + |
| 149 | +```shell |
| 150 | +cURL --request DELETE 'http://localhost:4444/se/grid/newsessionqueuer/queue' |
| 151 | +``` |
| 152 | + |
| 153 | +In the fully distributed mode, the queuer URL is New Session Queuer server address. |
| 154 | +```shell |
| 155 | +cURL --request DELETE 'http://localhost:5559/se/grid/newsessionqueuer/queue' |
| 156 | +``` |
| 157 | + |
| 158 | + |
0 commit comments