Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1 | ----------------------------------------------- |
| 2 | Stream Processing Offload Engine (SPOE) |
Christopher Faulet | 57583e4 | 2017-09-04 15:41:09 +0200 | [diff] [blame] | 3 | Version 1.2 |
Christopher Faulet | 3b78809 | 2020-05-13 08:25:12 +0200 | [diff] [blame] | 4 | ( Last update: 2020-06-13 ) |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 5 | ----------------------------------------------- |
| 6 | Author : Christopher Faulet |
| 7 | Contact : cfaulet at haproxy dot com |
| 8 | |
| 9 | |
| 10 | SUMMARY |
| 11 | -------- |
| 12 | |
| 13 | 0. Terms |
| 14 | 1. Introduction |
| 15 | 2. SPOE configuration |
| 16 | 2.1. SPOE scope |
| 17 | 2.2. "spoe-agent" section |
| 18 | 2.3. "spoe-message" section |
Christopher Faulet | 11610f3 | 2017-09-21 10:23:10 +0200 | [diff] [blame] | 19 | 2.4. "spoe-group" section |
| 20 | 2.5. Example |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 21 | 3. SPOP specification |
| 22 | 3.1. Data types |
| 23 | 3.2. Frames |
| 24 | 3.2.1. Frame capabilities |
| 25 | 3.2.2. Frame types overview |
| 26 | 3.2.3. Workflow |
| 27 | 3.2.4. Frame: HAPROXY-HELLO |
| 28 | 3.2.5. Frame: AGENT-HELLO |
| 29 | 3.2.6. Frame: NOTIFY |
| 30 | 3.2.7. Frame: ACK |
| 31 | 3.2.8. Frame: HAPROXY-DISCONNECT |
| 32 | 3.2.9. Frame: AGENT-DISCONNECT |
| 33 | 3.3. Events & messages |
| 34 | 3.4. Actions |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 35 | 3.5. Errors & timeouts |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 36 | 4. Logging |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 37 | |
| 38 | |
| 39 | 0. Terms |
| 40 | --------- |
| 41 | |
| 42 | * SPOE : Stream Processing Offload Engine. |
| 43 | |
Ilya Shipitsin | 11057a3 | 2020-06-21 21:18:27 +0500 | [diff] [blame] | 44 | A SPOE is a filter talking to servers managed by a SPOA to offload the |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 45 | stream processing. An engine is attached to a proxy. A proxy can have |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 46 | several engines. Each engine is linked to an agent and only one. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 47 | |
| 48 | * SPOA : Stream Processing Offload Agent. |
| 49 | |
| 50 | A SPOA is a service that will receive info from a SPOE to offload the |
| 51 | stream processing. An agent manages several servers. It uses a backend to |
| 52 | reference all of them. By extension, these servers can also be called |
| 53 | agents. |
| 54 | |
| 55 | * SPOP : Stream Processing Offload Protocol, used by SPOEs to talk to SPOA |
| 56 | servers. |
| 57 | |
| 58 | This protocol is used by engines to talk to agents. It is an in-house |
| 59 | binary protocol described in this documentation. |
| 60 | |
| 61 | |
| 62 | 1. Introduction |
| 63 | ---------------- |
| 64 | |
| 65 | SPOE is a feature introduced in HAProxy 1.7. It makes possible the |
| 66 | communication with external components to retrieve some info. The idea started |
| 67 | with the problems caused by most ldap libs not working fine in event-driven |
| 68 | systems (often at least the connect() is blocking). So, it is hard to properly |
| 69 | implement Single Sign On solution (SSO) in HAProxy. The SPOE will ease this |
| 70 | kind of processing, or we hope so. |
| 71 | |
| 72 | Now, the aim of SPOE is to allow any kind of offloading on the streams. First |
Christopher Faulet | 3b78809 | 2020-05-13 08:25:12 +0200 | [diff] [blame] | 73 | releases won't do lot of things. As we will see, there are few handled events |
| 74 | and even less actions supported. Actually, for now, the SPOE can offload the |
| 75 | processing before "tcp-request content", "tcp-response content", "http-request" |
| 76 | and "http-response" rules. And it only supports variables definition. But, in |
| 77 | spite of these limited features, we can easily imagine to implement SSO |
| 78 | solution, ip reputation or ip geolocation services. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 79 | |
| 80 | |
| 81 | 2. SPOE configuration |
| 82 | ---------------------- |
| 83 | |
| 84 | Because SPOE is implemented as a filter, To use it, you must declare a "filter |
| 85 | spoe" line in a proxy section (frontend/backend/listen) : |
| 86 | |
| 87 | frontend my-front |
| 88 | ... |
| 89 | filter spoe [engine <name>] config <file> |
| 90 | ... |
| 91 | |
| 92 | The "config" parameter is mandatory. It specififies the SPOE configuration |
| 93 | file. The engine name is optional. It can be set to declare the scope to use in |
| 94 | the SPOE configuration. So it is possible to use the same SPOE configuration |
| 95 | for several engines. If no name is provided, the SPOE configuration must not |
| 96 | contain any scope directive. |
| 97 | |
| 98 | We use a separate configuration file on purpose. By commenting SPOE filter |
Michael Prokop | 4438c60 | 2019-05-24 10:25:45 +0200 | [diff] [blame] | 99 | line, you completely disable the feature, including the parsing of sections |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 100 | reserved to SPOE. This is also a way to keep the HAProxy configuration clean. |
| 101 | |
| 102 | A SPOE configuration file must contains, at least, the SPOA configuration |
Christopher Faulet | 11610f3 | 2017-09-21 10:23:10 +0200 | [diff] [blame] | 103 | ("spoe-agent" section) and SPOE messages/groups ("spoe-message" or "spoe-group" |
| 104 | sections) attached to this agent. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 105 | |
| 106 | IMPORTANT : The configuration of a SPOE filter must be located in a dedicated |
| 107 | file. But the backend used by a SPOA must be declared in HAProxy configuration |
| 108 | file. |
| 109 | |
| 110 | 2.1. SPOE scope |
| 111 | ------------------------- |
| 112 | |
| 113 | If you specify an engine name on the SPOE filter line, then you need to define |
| 114 | scope in the SPOE configuration with the same name. You can have several SPOE |
| 115 | scope in the same file. In each scope, you must define one and only one |
| 116 | "spoe-agent" section to configure the SPOA linked to your SPOE and several |
Ilya Shipitsin | 2a950d0 | 2020-03-06 13:07:38 +0500 | [diff] [blame] | 117 | "spoe-message" and "spoe-group" sections to describe, respectively, messages and |
Christopher Faulet | 11610f3 | 2017-09-21 10:23:10 +0200 | [diff] [blame] | 118 | group of messages sent to servers mananged by your SPOA. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 119 | |
| 120 | A SPOE scope starts with this kind of line : |
| 121 | |
| 122 | [<name>] |
| 123 | |
| 124 | where <name> is the same engine name specified on the SPOE filter line. The |
| 125 | scope ends when the file ends or when another scope is found. |
| 126 | |
| 127 | Example : |
| 128 | [my-first-engine] |
| 129 | spoe-agent my-agent |
| 130 | ... |
| 131 | spoe-message msg1 |
| 132 | ... |
| 133 | spoe-message msg2 |
| 134 | ... |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 135 | spoe-group grp1 |
Christopher Faulet | 11610f3 | 2017-09-21 10:23:10 +0200 | [diff] [blame] | 136 | ... |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 137 | spoe-group grp2 |
| 138 | ... |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 139 | |
| 140 | [my-second-engine] |
| 141 | ... |
| 142 | |
| 143 | If no engine name is provided on the SPOE filter line, no SPOE scope must be |
| 144 | found in the SPOE configuration file. All the file is considered to be in the |
| 145 | same anonymous and implicit scope. |
| 146 | |
Christopher Faulet | 7ee8667 | 2017-09-19 11:08:28 +0200 | [diff] [blame] | 147 | The engine name must be uniq for a proxy. If no engine name is provided on the |
Joseph Herlant | 71b4b15 | 2018-11-13 16:55:16 -0800 | [diff] [blame] | 148 | SPOE filter line, the SPOE agent name is used by default. |
Christopher Faulet | 7ee8667 | 2017-09-19 11:08:28 +0200 | [diff] [blame] | 149 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 150 | 2.2. "spoe-agent" section |
| 151 | -------------------------- |
| 152 | |
| 153 | For each engine, you must define one and only one "spoe-agent" section. In this |
| 154 | section, you will declare SPOE messages and the backend you will use. You will |
| 155 | also set timeouts and options to customize your agent's behaviour. |
| 156 | |
| 157 | |
| 158 | spoe-agent <name> |
| 159 | Create a new SPOA with the name <name>. It must have one and only one |
| 160 | "spoe-agent" definition by SPOE scope. |
| 161 | |
| 162 | Arguments : |
| 163 | <name> is the name of the agent section. |
| 164 | |
| 165 | following keywords are supported : |
Christopher Faulet | 11610f3 | 2017-09-21 10:23:10 +0200 | [diff] [blame] | 166 | - groups |
Christopher Faulet | 7250b8f | 2018-03-26 17:19:01 +0200 | [diff] [blame] | 167 | - log |
Christopher Faulet | 4802672 | 2016-11-16 15:01:12 +0100 | [diff] [blame] | 168 | - maxconnrate |
| 169 | - maxerrrate |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 170 | - max-frame-size |
Christopher Faulet | e8ade38 | 2018-01-25 15:32:22 +0100 | [diff] [blame] | 171 | - max-waiting-frames |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 172 | - messages |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 173 | - [no] option async |
Christopher Faulet | 0e0f085 | 2018-03-26 17:20:36 +0200 | [diff] [blame] | 174 | - [no] option dontlog-normal |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 175 | - [no] option pipelining |
| 176 | - [no] option send-frag-payload |
Christopher Faulet | ea62c2a | 2016-11-14 10:54:21 +0100 | [diff] [blame] | 177 | - option continue-on-error |
Christopher Faulet | 336d3ef | 2017-12-22 10:00:55 +0100 | [diff] [blame] | 178 | - option force-set-var |
Christopher Faulet | 985532d | 2016-11-16 15:36:19 +0100 | [diff] [blame] | 179 | - option set-on-error |
Christopher Faulet | 36bda1c | 2018-03-22 09:08:20 +0100 | [diff] [blame] | 180 | - option set-process-time |
| 181 | - option set-total-time |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 182 | - option var-prefix |
Christopher Faulet | 336d3ef | 2017-12-22 10:00:55 +0100 | [diff] [blame] | 183 | - register-var-names |
Christopher Faulet | 03a3449 | 2016-11-19 16:47:56 +0100 | [diff] [blame] | 184 | - timeout hello|idle|processing |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 185 | - use-backend |
| 186 | |
| 187 | |
Christopher Faulet | 11610f3 | 2017-09-21 10:23:10 +0200 | [diff] [blame] | 188 | groups <grp-name> ... |
| 189 | Declare the list of SPOE groups that an agent will handle. |
| 190 | |
| 191 | Arguments : |
| 192 | <grp-name> is the name of a SPOE group. |
| 193 | |
Joseph Herlant | 71b4b15 | 2018-11-13 16:55:16 -0800 | [diff] [blame] | 194 | Groups declared here must be found in the same engine scope, else an error is |
Christopher Faulet | 11610f3 | 2017-09-21 10:23:10 +0200 | [diff] [blame] | 195 | triggered during the configuration parsing. You can have many "groups" lines. |
| 196 | |
| 197 | See also: "spoe-group" section. |
| 198 | |
| 199 | |
Christopher Faulet | 7250b8f | 2018-03-26 17:19:01 +0200 | [diff] [blame] | 200 | log global |
| 201 | log <address> [len <length>] [format <format>] <facility> [<level> [<minlevel>]] |
| 202 | no log |
| 203 | Enable per-instance logging of events and traffic. |
| 204 | |
| 205 | Prefix : |
| 206 | no should be used when the logger list must be flushed. |
| 207 | |
| 208 | See the HAProxy Configuration Manual for details about this option. |
| 209 | |
Christopher Faulet | 4802672 | 2016-11-16 15:01:12 +0100 | [diff] [blame] | 210 | maxconnrate <number> |
| 211 | Set the maximum number of connections per second to <number>. The SPOE will |
| 212 | stop to open new connections if the maximum is reached and will wait to |
| 213 | acquire an existing one. So it is important to set "timeout hello" to a |
| 214 | relatively small value. |
| 215 | |
| 216 | |
| 217 | maxerrrate <number> |
| 218 | Set the maximum number of errors per second to <number>. The SPOE will stop |
| 219 | its processing if the maximum is reached. |
| 220 | |
| 221 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 222 | max-frame-size <number> |
| 223 | Set the maximum allowed size for frames exchanged between HAProxy and SPOA. |
| 224 | It must be in the range [256, tune.bufsize-4] (4 bytes are reserved for the |
| 225 | frame length). By default, it is set to (tune.bufsize-4). |
| 226 | |
Christopher Faulet | e8ade38 | 2018-01-25 15:32:22 +0100 | [diff] [blame] | 227 | max-waiting-frames <number> |
| 228 | Set the maximum number of frames waiting for an acknowledgement on the same |
| 229 | connection. This value is only used when the pipelinied or asynchronus |
| 230 | exchanges between HAProxy and SPOA are enabled. By default, it is set to 20. |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 231 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 232 | messages <msg-name> ... |
| 233 | Declare the list of SPOE messages that an agent will handle. |
| 234 | |
| 235 | Arguments : |
| 236 | <msg-name> is the name of a SPOE message. |
| 237 | |
| 238 | Messages declared here must be found in the same engine scope, else an error |
| 239 | is triggered during the configuration parsing. You can have many "messages" |
| 240 | lines. |
| 241 | |
| 242 | See also: "spoe-message" section. |
| 243 | |
| 244 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 245 | option async |
| 246 | no option async |
| 247 | Enable or disable the support of asynchronus exchanges between HAProxy and |
| 248 | SPOA. By default, this option is enabled. |
| 249 | |
| 250 | |
Christopher Faulet | ea62c2a | 2016-11-14 10:54:21 +0100 | [diff] [blame] | 251 | option continue-on-error |
| 252 | Do not stop the events processing when an error occurred on a stream. |
| 253 | |
| 254 | By default, for a specific stream, when an abnormal/unexpected error occurs, |
| 255 | the SPOE is disabled for all the transaction. So if you have several events |
Ilya Shipitsin | 11057a3 | 2020-06-21 21:18:27 +0500 | [diff] [blame] | 256 | configured, such error on an event will disabled all following. For TCP |
Christopher Faulet | ea62c2a | 2016-11-14 10:54:21 +0100 | [diff] [blame] | 257 | streams, this will disable the SPOE for the whole session. For HTTP streams, |
| 258 | this will disable it for the transaction (request and response). |
| 259 | |
| 260 | When set, this option bypass this behaviour and only the current event will |
| 261 | be ignored. |
| 262 | |
Christopher Faulet | 0e0f085 | 2018-03-26 17:20:36 +0200 | [diff] [blame] | 263 | |
| 264 | option dontlog-normal |
| 265 | no option dontlog-normal |
| 266 | Enable or disable logging of normal, successful processing. |
| 267 | |
| 268 | Arguments : none |
| 269 | |
| 270 | See also: "log" and section 4 about logging. |
| 271 | |
| 272 | |
Etienne Carriere | aec8989 | 2017-12-14 09:36:40 +0000 | [diff] [blame] | 273 | option force-set-var |
| 274 | By default, SPOE filter only register already known variables (mainly from |
| 275 | parsing of the configuration). If you want that haproxy trusts the agent and |
| 276 | registers all variables (ex: can be useful for LUA workload), activate this |
| 277 | option. |
| 278 | |
| 279 | Caution : this option opens to a variety of attacks such as a rogue SPOA that |
| 280 | asks to register too many variables. |
| 281 | |
Christopher Faulet | ea62c2a | 2016-11-14 10:54:21 +0100 | [diff] [blame] | 282 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 283 | option pipelining |
| 284 | no option pipelining |
| 285 | Enable or disable the support of pipelined exchanges between HAProxy and |
| 286 | SPOA. By default, this option is enabled. |
| 287 | |
| 288 | |
| 289 | option send-frag-payload |
| 290 | no option send-frag-payload |
| 291 | Enable or disable the sending of fragmented payload to SPOA. By default, this |
| 292 | option is enabled. |
| 293 | |
| 294 | |
Christopher Faulet | 985532d | 2016-11-16 15:36:19 +0100 | [diff] [blame] | 295 | option set-on-error <var name> |
| 296 | Define the variable to set when an error occurred during an event processing. |
| 297 | |
| 298 | Arguments : |
| 299 | |
| 300 | <var name> is the variable name, without the scope. The name may only |
| 301 | contain characters 'a-z', 'A-Z', '0-9', '.' and '_'. |
| 302 | |
| 303 | This variable will only be set when an error occurred in the scope of the |
| 304 | transaction. As for all other variables define by the SPOE, it will be |
| 305 | prefixed. So, if your variable name is "error" and your prefix is |
| 306 | "my_spoe_pfx", the variable will be "txn.my_spoe_pfx.error". |
| 307 | |
Christopher Faulet | b067b06 | 2017-01-04 16:39:11 +0100 | [diff] [blame] | 308 | When set, the variable is an integer representing the error reason. For values |
| 309 | under 256, it represents an error coming from the engine. Below 256, it |
| 310 | reports a SPOP error. In this case, to retrieve the right SPOP status code, |
| 311 | you must remove 256 to this value. Here are possible values: |
| 312 | |
| 313 | * 1 a timeout occurred during the event processing. |
| 314 | |
Michael Prokop | 4438c60 | 2019-05-24 10:25:45 +0200 | [diff] [blame] | 315 | * 2 an error was triggered during the resources allocation. |
Christopher Faulet | b067b06 | 2017-01-04 16:39:11 +0100 | [diff] [blame] | 316 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 317 | * 3 the frame payload exceeds the frame size and it cannot be |
| 318 | fragmented. |
| 319 | |
| 320 | * 4 the fragmentation of a payload is aborted. |
| 321 | |
Christopher Faulet | 344c4ab | 2017-09-22 10:20:13 +0200 | [diff] [blame] | 322 | * 5 The frame processing has been interrupted by HAProxy. |
| 323 | |
Christopher Faulet | b067b06 | 2017-01-04 16:39:11 +0100 | [diff] [blame] | 324 | * 255 an unknown error occurred during the event processing. |
| 325 | |
| 326 | * 256+N a SPOP error occurred during the event processing (see section |
| 327 | "Errors & timeouts"). |
| 328 | |
| 329 | Note that if "option continue-on-error" is set, the variable is not |
| 330 | automatically removed between events processing. |
Christopher Faulet | 985532d | 2016-11-16 15:36:19 +0100 | [diff] [blame] | 331 | |
| 332 | See also: "option continue-on-error", "option var-prefix". |
| 333 | |
Christopher Faulet | 36bda1c | 2018-03-22 09:08:20 +0100 | [diff] [blame] | 334 | |
| 335 | option set-process-time <var name> |
| 336 | Define the variable to set to report the processing time of the last event or |
| 337 | group. |
| 338 | |
| 339 | Arguments : |
| 340 | |
| 341 | <var name> is the variable name, without the scope. The name may only |
| 342 | contain characters 'a-z', 'A-Z', '0-9', '.' and '_'. |
| 343 | |
| 344 | This variable will be set in the scope of the transaction. As for all other |
| 345 | variables define by the SPOE, it will be prefixed. So, if your variable name |
| 346 | is "process_time" and your prefix is "my_spoe_pfx", the variable will be |
| 347 | "txn.my_spoe_pfx.process_time". |
| 348 | |
| 349 | When set, the variable is an integer representing the delay to process the |
| 350 | event or the group, in milliseconds. From the stream point of view, it is the |
| 351 | latency added by the SPOE processing for the last handled event or group. |
| 352 | |
| 353 | If several events or groups are processed for the same stream, this value |
| 354 | will be overrideen. |
| 355 | |
| 356 | See also: "option set-total-time". |
| 357 | |
| 358 | |
| 359 | option set-total-time <var name> |
| 360 | Define the variable to set to report the total processing time SPOE for a |
| 361 | stream. |
| 362 | |
| 363 | Arguments : |
| 364 | |
| 365 | <var name> is the variable name, without the scope. The name may only |
| 366 | contain characters 'a-z', 'A-Z', '0-9', '.' and '_'. |
| 367 | |
| 368 | This variable will be set in the scope of the transaction. As for all other |
| 369 | variables define by the SPOE, it will be prefixed. So, if your variable name |
| 370 | is "total_time" and your prefix is "my_spoe_pfx", the variable will be |
| 371 | "txn.my_spoe_pfx.total_time". |
| 372 | |
| 373 | When set, the variable is an integer representing the sum of processing times |
| 374 | for a stream, in milliseconds. From the stream point of view, it is the |
| 375 | latency added by the SPOE processing. |
| 376 | |
| 377 | If several events or groups are processed for the same stream, this value |
| 378 | will be updated. |
| 379 | |
| 380 | See also: "option set-process-time". |
| 381 | |
| 382 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 383 | option var-prefix <prefix> |
| 384 | Define the prefix used when variables are set by an agent. |
| 385 | |
| 386 | Arguments : |
| 387 | |
| 388 | <prefix> is the prefix used to limit the scope of variables set by an |
| 389 | agent. |
| 390 | |
| 391 | To avoid conflict with other variables defined by HAProxy, all variables |
| 392 | names will be prefixed. By default, the "spoe-agent" name is used. This |
| 393 | option can be used to customize it. |
| 394 | |
| 395 | The prefix will be added between the variable scope and its name, separated |
| 396 | by a '.'. It may only contain characters 'a-z', 'A-Z', '0-9', '.' and '_', as |
| 397 | for variables name. In HAProxy configuration, you need to use this prefix as |
| 398 | a part of the variables name. For example, if an agent define the variable |
| 399 | "myvar" in the "txn" scope, with the prefix "my_spoe_pfx", then you should |
| 400 | use "txn.my_spoe_pfx.myvar" name in your HAProxy configuration. |
| 401 | |
Etienne Carriere | aec8989 | 2017-12-14 09:36:40 +0000 | [diff] [blame] | 402 | By default, an agent will never set new variables at runtime: It can only set |
| 403 | new value for existing ones. If you want a different behaviour, see |
Christopher Faulet | 336d3ef | 2017-12-22 10:00:55 +0100 | [diff] [blame] | 404 | force-set-var option and register-var-names directive. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 405 | |
Christopher Faulet | 336d3ef | 2017-12-22 10:00:55 +0100 | [diff] [blame] | 406 | register-var-names <var name> ... |
| 407 | Register some variable names. By default, an agent will not be allowed to set |
| 408 | new variables at runtime. This rule can be totally relaxed by setting the |
| 409 | option "force-set-var". If you know all the variables you will need, this |
| 410 | directive is a good way to register them without letting an agent doing what |
| 411 | it want. This is only required if these variables are not referenced anywhere |
| 412 | in the HAProxy configuration or the SPOE one. |
| 413 | |
| 414 | Arguments: |
| 415 | <var name> is a variable name without the scope. The name may only |
| 416 | contain characters 'a-z', 'A-Z', '0-9', '.' and '_'. |
| 417 | |
| 418 | The prefix will be automatically added during the registration. You can have |
| 419 | many "register-var-names" lines. |
| 420 | |
| 421 | See also: "option force-set-var", "option var-prefix". |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 422 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 423 | timeout hello <timeout> |
| 424 | Set the maximum time to wait for an agent to receive the AGENT-HELLO frame. |
Christopher Faulet | f7a3092 | 2016-11-10 15:04:51 +0100 | [diff] [blame] | 425 | It is applied on the stream that handle the connection with the agent. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 426 | |
| 427 | Arguments : |
| 428 | <timeout> is the timeout value specified in milliseconds by default, but |
| 429 | can be in any other unit if the number is suffixed by the unit, |
| 430 | as explained at the top of this document. |
| 431 | |
| 432 | This timeout is an applicative timeout. It differ from "timeout connect" |
| 433 | defined on backends. |
| 434 | |
| 435 | |
| 436 | timeout idle <timeout> |
Christopher Faulet | f7a3092 | 2016-11-10 15:04:51 +0100 | [diff] [blame] | 437 | Set the maximum time to wait for an agent to close an idle connection. It is |
| 438 | applied on the stream that handle the connection with the agent. |
| 439 | |
| 440 | Arguments : |
| 441 | <timeout> is the timeout value specified in milliseconds by default, but |
| 442 | can be in any other unit if the number is suffixed by the unit, |
| 443 | as explained at the top of this document. |
| 444 | |
| 445 | |
| 446 | timeout processing <timeout> |
| 447 | Set the maximum time to wait for a stream to process an event, i.e to acquire |
| 448 | a stream to talk with an agent, to encode all messages, to send the NOTIFY |
| 449 | frame, to receive the corrsponding acknowledgement and to process all |
| 450 | actions. It is applied on the stream that handle the client and the server |
| 451 | sessions. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 452 | |
| 453 | Arguments : |
| 454 | <timeout> is the timeout value specified in milliseconds by default, but |
| 455 | can be in any other unit if the number is suffixed by the unit, |
| 456 | as explained at the top of this document. |
| 457 | |
| 458 | |
| 459 | use-backend <backend> |
| 460 | Specify the backend to use. It must be defined. |
| 461 | |
| 462 | Arguments : |
| 463 | <backend> is the name of a valid "backend" section. |
| 464 | |
| 465 | |
| 466 | 2.3. "spoe-message" section |
| 467 | ---------------------------- |
| 468 | |
| 469 | To offload the stream processing, SPOE will send messages with specific |
| 470 | information at a specific moment in the stream life and will wait for |
| 471 | corresponding replies to know what to do. |
| 472 | |
| 473 | |
| 474 | spoe-message <name> |
| 475 | Create a new SPOE message with the name <name>. |
| 476 | |
| 477 | Arguments : |
| 478 | <name> is the name of the SPOE message. |
| 479 | |
| 480 | Here you define a message that can be referenced in a "spoe-agent" |
| 481 | section. Following keywords are supported : |
Christopher Faulet | 57583e4 | 2017-09-04 15:41:09 +0200 | [diff] [blame] | 482 | - acl |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 483 | - args |
| 484 | - event |
| 485 | |
| 486 | See also: "spoe-agent" section. |
| 487 | |
| 488 | |
Christopher Faulet | 57583e4 | 2017-09-04 15:41:09 +0200 | [diff] [blame] | 489 | acl <aclname> <criterion> [flags] [operator] <value> ... |
Christopher Faulet | 57583e4 | 2017-09-04 15:41:09 +0200 | [diff] [blame] | 490 | Declare or complete an access list. |
| 491 | |
| 492 | See section 7 about ACL usage in the HAProxy Configuration Manual. |
| 493 | |
| 494 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 495 | args [name=]<sample> ... |
| 496 | Define arguments passed into the SPOE message. |
| 497 | |
| 498 | Arguments : |
| 499 | <sample> is a sample expression. |
| 500 | |
| 501 | When the message is processed, if a sample expression is not available, it is |
| 502 | set to NULL. Arguments are processed in their declaration order and added in |
Joseph Herlant | 71b4b15 | 2018-11-13 16:55:16 -0800 | [diff] [blame] | 503 | the message in that order. It is possible to declare named arguments. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 504 | |
| 505 | For example: |
| 506 | args frontend=fe_id src dst |
| 507 | |
| 508 | |
Christopher Faulet | 57583e4 | 2017-09-04 15:41:09 +0200 | [diff] [blame] | 509 | event <name> [ { if | unless } <condition> ] |
| 510 | Set the event that triggers sending of the message. It may optionally be |
| 511 | followed by an ACL-based condition, in which case it will only be evaluated |
| 512 | if the condition is true. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 513 | |
Christopher Faulet | 57583e4 | 2017-09-04 15:41:09 +0200 | [diff] [blame] | 514 | ACL-based conditions are executed in the context of the stream that handle |
| 515 | the client and the server connections. |
| 516 | |
| 517 | Arguments : |
| 518 | <name> is the event name. |
| 519 | <condition> is a standard ACL-based condition. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 520 | |
| 521 | Supported events are: |
| 522 | - on-client-session |
Christopher Faulet | 1002aac | 2016-12-09 17:41:54 +0100 | [diff] [blame] | 523 | - on-server-session |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 524 | - on-frontend-tcp-request |
| 525 | - on-backend-tcp-request |
| 526 | - on-tcp-response |
| 527 | - on-frontend-http-request |
| 528 | - on-backend-http-request |
| 529 | - on-http-response |
| 530 | |
Christopher Faulet | 57583e4 | 2017-09-04 15:41:09 +0200 | [diff] [blame] | 531 | See section "Events & Messages" for more details about supported events. |
| 532 | See section 7 about ACL usage in the HAProxy Configuration Manual. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 533 | |
Christopher Faulet | 11610f3 | 2017-09-21 10:23:10 +0200 | [diff] [blame] | 534 | 2.4. "spoe-group" section |
| 535 | -------------------------- |
| 536 | |
| 537 | This section can be used to declare a group of SPOE messages. Unlike messages |
| 538 | referenced in a "spoe-agent" section, messages inside a group are not sent on a |
| 539 | specific event. The sending must be triggered by TCP or HTTP rules, from the |
| 540 | HAProxy configuration. |
| 541 | |
| 542 | |
| 543 | spoe-group <name> |
| 544 | Create a new SPOE group with the name <name>. |
| 545 | |
| 546 | Arguments : |
| 547 | <name> is the name of the SPOE group. |
| 548 | |
| 549 | Here you define a group of SPOE messages that can be referenced in a |
| 550 | "spoe-agent" section. Following keywords are supported : |
| 551 | - messages |
| 552 | |
| 553 | See also: "spoe-agent" and "spoe-message" sections. |
| 554 | |
| 555 | |
| 556 | messages <msg-name> ... |
| 557 | Declare the list of SPOE messages belonging to the group. |
| 558 | |
| 559 | Arguments : |
| 560 | <msg-name> is the name of a SPOE message. |
| 561 | |
| 562 | Messages declared here must be found in the same engine scope, else an error |
| 563 | is triggered during the configuration parsing. Furthermore, a message belongs |
| 564 | at most to a group. You can have many "messages" lines. |
| 565 | |
| 566 | See also: "spoe-message" section. |
| 567 | |
| 568 | |
| 569 | 2.5. Example |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 570 | ------------- |
| 571 | |
| 572 | Here is a simple but complete example that sends client-ip address to a ip |
| 573 | reputation service. This service can set the variable "ip_score" which is an |
| 574 | integer between 0 and 100, indicating its reputation (100 means totally safe |
| 575 | and 0 a blacklisted IP with no doubt). |
| 576 | |
| 577 | ### |
| 578 | ### HAProxy configuration |
| 579 | frontend www |
| 580 | mode http |
| 581 | bind *:80 |
| 582 | |
| 583 | filter spoe engine ip-reputation config spoe-ip-reputation.conf |
| 584 | |
| 585 | # Reject connection if the IP reputation is under 20 |
| 586 | tcp-request content reject if { var(sess.iprep.ip_score) -m int lt 20 } |
| 587 | |
| 588 | default_backend http-servers |
| 589 | |
| 590 | backend http-servers |
| 591 | mode http |
| 592 | server http A.B.C.D:80 |
| 593 | |
| 594 | backend iprep-servers |
| 595 | mode tcp |
| 596 | balance roundrobin |
| 597 | |
| 598 | timeout connect 5s # greater than hello timeout |
| 599 | timeout server 3m # greater than idle timeout |
| 600 | |
| 601 | server iprep1 A1.B1.C1.D1:12345 |
| 602 | server iprep2 A2.B2.C2.D2:12345 |
| 603 | |
| 604 | #### |
| 605 | ### spoe-ip-reputation.conf |
| 606 | [ip-reputation] |
| 607 | |
| 608 | spoe-agent iprep-agent |
| 609 | messages get-ip-reputation |
| 610 | |
| 611 | option var-prefix iprep |
| 612 | |
Christopher Faulet | 03a3449 | 2016-11-19 16:47:56 +0100 | [diff] [blame] | 613 | timeout hello 2s |
| 614 | timeout idle 2m |
| 615 | timeout processing 10ms |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 616 | |
| 617 | use-backend iprep-servers |
| 618 | |
| 619 | spoe-message get-ip-reputation |
| 620 | args ip=src |
Christopher Faulet | 57583e4 | 2017-09-04 15:41:09 +0200 | [diff] [blame] | 621 | event on-client-session if ! { src -f /etc/haproxy/whitelist.lst } |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 622 | |
| 623 | |
| 624 | 3. SPOP specification |
| 625 | ---------------------- |
| 626 | |
| 627 | 3.1. Data types |
| 628 | ---------------- |
| 629 | |
| 630 | Here is the bytewise representation of typed data: |
| 631 | |
| 632 | TYPED-DATA : <TYPE:4 bits><FLAGS:4 bits><DATA> |
| 633 | |
| 634 | Supported types and their representation are: |
| 635 | |
| 636 | TYPE | ID | DESCRIPTION |
| 637 | -----------------------------+-----+---------------------------------- |
| 638 | NULL | 0 | NULL : <0> |
| 639 | Boolean | 1 | BOOL : <1+FLAG> |
| 640 | 32bits signed integer | 2 | INT32 : <2><VALUE:varint> |
| 641 | 32bits unsigned integer | 3 | UINT32 : <3><VALUE:varint> |
| 642 | 64bits signed integer | 4 | INT64 : <4><VALUE:varint> |
| 643 | 32bits unsigned integer | 5 | UNIT64 : <5><VALUE:varint> |
| 644 | IPV4 | 6 | IPV4 : <6><STRUCT IN_ADDR:4 bytes> |
| 645 | IPV6 | 7 | IPV6 : <7><STRUCT IN_ADDR6:16 bytes> |
| 646 | String | 8 | STRING : <8><LENGTH:varint><BYTES> |
| 647 | Binary | 9 | BINARY : <9><LENGTH:varint><BYTES> |
| 648 | 10 -> 15 unused/reserved | - | - |
| 649 | -----------------------------+-----+---------------------------------- |
| 650 | |
| 651 | Variable-length integer (varint) are encoded using Peers encoding: |
| 652 | |
| 653 | |
| 654 | 0 <= X < 240 : 1 byte (7.875 bits) [ XXXX XXXX ] |
| 655 | 240 <= X < 2288 : 2 bytes (11 bits) [ 1111 XXXX ] [ 0XXX XXXX ] |
| 656 | 2288 <= X < 264432 : 3 bytes (18 bits) [ 1111 XXXX ] [ 1XXX XXXX ] [ 0XXX XXXX ] |
| 657 | 264432 <= X < 33818864 : 4 bytes (25 bits) [ 1111 XXXX ] [ 1XXX XXXX ]*2 [ 0XXX XXXX ] |
| 658 | 33818864 <= X < 4328786160 : 5 bytes (32 bits) [ 1111 XXXX ] [ 1XXX XXXX ]*3 [ 0XXX XXXX ] |
| 659 | ... |
| 660 | |
| 661 | For booleans, the value (true or false) is the first bit in the FLAGS |
| 662 | bitfield. if this bit is set to 0, then the boolean is evaluated as false, |
| 663 | otherwise, the boolean is evaluated as true. |
| 664 | |
| 665 | 3.2. Frames |
| 666 | ------------ |
| 667 | |
| 668 | Exchange between HAProxy and agents are made using FRAME packets. All frames |
| 669 | must be prefixed with their size encoded on 4 bytes in network byte order: |
| 670 | |
| 671 | <FRAME-LENGTH:4 bytes> <FRAME> |
| 672 | |
| 673 | A frame always starts with its type, on one byte, followed by metadata |
| 674 | containing flags, on 4 bytes and a two variable-length integer representing the |
| 675 | stream identifier and the frame identifier inside the stream: |
| 676 | |
| 677 | FRAME : <FRAME-TYPE:1 byte> <METADATA> <FRAME-PAYLOAD> |
| 678 | METADATA : <FLAGS:4 bytes> <STREAM-ID:varint> <FRAME-ID:varint> |
| 679 | |
| 680 | Then comes the frame payload. Depending on the frame type, the payload can be |
| 681 | of three types: a simple key/value list, a list of messages or a list of |
| 682 | actions. |
| 683 | |
| 684 | FRAME-PAYLOAD : <LIST-OF-MESSAGES> | <LIST-OF-ACTIONS> | <KV-LIST> |
| 685 | |
| 686 | LIST-OF-MESSAGES : [ <MESSAGE-NAME> <NB-ARGS:1 byte> <KV-LIST> ... ] |
| 687 | MESSAGE-NAME : <STRING> |
| 688 | |
| 689 | LIST-OF-ACTIONS : [ <ACTION-TYPE:1 byte> <NB-ARGS:1 byte> <ACTION-ARGS> ... ] |
| 690 | ACTION-ARGS : [ <TYPED-DATA>... ] |
| 691 | |
| 692 | KV-LIST : [ <KV-NAME> <KV-VALUE> ... ] |
| 693 | KV-NAME : <STRING> |
| 694 | KV-VALUE : <TYPED-DATA> |
| 695 | |
Thierry FOURNIER | c4dcaff | 2018-05-18 12:25:39 +0200 | [diff] [blame] | 696 | FLAGS : |
| 697 | |
| 698 | Flags are a 32 bits field. They are encoded on 4 bytes in network byte |
| 699 | order, where the bit 0 is the LSB. |
| 700 | |
| 701 | 0 1 2-31 |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 702 | +---+---+----------+ |
| 703 | | | A | | |
| 704 | | F | B | | |
| 705 | | I | O | RESERVED | |
| 706 | | N | R | | |
| 707 | | | T | | |
| 708 | +---+---+----------+ |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 709 | |
| 710 | FIN: Indicates that this is the final payload fragment. The first fragment |
| 711 | may also be the final fragment. |
| 712 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 713 | ABORT: Indicates that the processing of the current frame must be |
| 714 | cancelled. This bit should be set on frames with a fragmented |
| 715 | payload. It can be ignore for frames with an unfragemnted |
| 716 | payload. When it is set, the FIN bit must also be set. |
| 717 | |
| 718 | |
Joseph Herlant | 71b4b15 | 2018-11-13 16:55:16 -0800 | [diff] [blame] | 719 | Frames cannot exceed a maximum size negotiated between HAProxy and agents |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 720 | during the HELLO handshake. Most of time, payload will be small enough to send |
| 721 | it in one frame. But when supported by the peer, it will be possible to |
| 722 | fragment huge payload on many frames. This ability is announced during the |
| 723 | HELLO handshake and it can be asynmetric (supported by agents but not by |
| 724 | HAProxy or the opposite). The following rules apply to fragmentation: |
| 725 | |
| 726 | * An unfragemnted payload consists of a single frame with the FIN bit set. |
| 727 | |
| 728 | * A fragemented payload consists of several frames with the FIN bit clear and |
| 729 | terminated by a single frame with the FIN bit set. All these frames must |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 730 | share the same STREAM-ID and FRAME-ID. The first frame must set the right |
| 731 | FRAME-TYPE (e.g, NOTIFY). The following frames must have an unset type (0). |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 732 | |
| 733 | Beside the support of fragmented payload by a peer, some payload must not be |
| 734 | fragmented. See below for details. |
| 735 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 736 | IMPORTANT : The maximum size supported by peers for a frame must be greater |
| 737 | than or equal to 256 bytes. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 738 | |
| 739 | 3.2.1. Frame capabilities |
| 740 | -------------------------- |
| 741 | |
| 742 | Here are the list of official capabilities that HAProxy and agents can support: |
| 743 | |
Christopher Faulet | a1cda02 | 2016-12-21 08:58:06 +0100 | [diff] [blame] | 744 | * fragmentation: This is the ability for a peer to support fragmented |
| 745 | payload in received frames. This is an asymmectical |
| 746 | capability, it only concerns the peer that announces |
| 747 | it. This is the responsibility to the other peer to use it |
| 748 | or not. |
| 749 | |
| 750 | * pipelining: This is the ability for a peer to decouple NOTIFY and ACK |
| 751 | frames. This is a symmectical capability. To be used, it must |
| 752 | be supported by HAproxy and agents. Unlike HTTP pipelining, the |
| 753 | ACK frames can be send in any order, but always on the same TCP |
| 754 | connection used for the corresponding NOTIFY frame. |
| 755 | |
| 756 | * async: This ability is similar to the pipelining, but here any TCP |
| 757 | connection established between HAProxy and the agent can be used to |
| 758 | send ACK frames. if an agent accepts connections from multiple |
| 759 | HAProxy, it can use the "engine-id" value to group TCP |
| 760 | connections. See details about HAPROXY-HELLO frame. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 761 | |
| 762 | Unsupported or unknown capabilities are silently ignored, when possible. |
| 763 | |
Christopher Faulet | 71ebab6 | 2021-03-02 10:05:03 +0100 | [diff] [blame] | 764 | NOTE: HAProxy does not support the fragmentation for now. This means it is not |
| 765 | able to handle fragmented frames. However, if an agent announces the |
| 766 | fragmentation support, HAProxy may choose to send fragemented frames. |
| 767 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 768 | 3.2.2. Frame types overview |
| 769 | ---------------------------- |
| 770 | |
| 771 | Here are types of frame supported by SPOE. Frames sent by HAProxy come first, |
| 772 | then frames sent by agents : |
| 773 | |
| 774 | TYPE | ID | DESCRIPTION |
| 775 | -----------------------------+-----+------------------------------------- |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 776 | UNSET | 0 | Used for all frames but the first when a |
| 777 | | | payload is fragmented. |
| 778 | -----------------------------+-----+------------------------------------- |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 779 | HAPROXY-HELLO | 1 | Sent by HAProxy when it opens a |
| 780 | | | connection on an agent. |
| 781 | | | |
| 782 | HAPROXY-DISCONNECT | 2 | Sent by HAProxy when it want to close |
| 783 | | | the connection or in reply to an |
| 784 | | | AGENT-DISCONNECT frame |
| 785 | | | |
| 786 | NOTIFY | 3 | Sent by HAProxy to pass information |
| 787 | | | to an agent |
| 788 | -----------------------------+-----+------------------------------------- |
| 789 | AGENT-HELLO | 101 | Reply to a HAPROXY-HELLO frame, when |
| 790 | | | the connection is established |
| 791 | | | |
| 792 | AGENT-DISCONNECT | 102 | Sent by an agent just before closing |
| 793 | | | the connection |
| 794 | | | |
| 795 | ACK | 103 | Sent to acknowledge a NOTIFY frame |
| 796 | -----------------------------+-----+------------------------------------- |
| 797 | |
| 798 | Unknown frames may be silently skipped. |
| 799 | |
| 800 | 3.2.3. Workflow |
| 801 | ---------------- |
| 802 | |
| 803 | * Successful HELLO handshake: |
| 804 | |
| 805 | HAPROXY AGENT SRV |
| 806 | | HAPROXY-HELLO | |
Christopher Faulet | ba7bc16 | 2016-11-07 21:07:38 +0100 | [diff] [blame] | 807 | | (healthcheck: false) | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 808 | | --------------------------> | |
| 809 | | | |
| 810 | | AGENT-HELLO | |
| 811 | | <-------------------------- | |
| 812 | | | |
| 813 | |
Christopher Faulet | ba7bc16 | 2016-11-07 21:07:38 +0100 | [diff] [blame] | 814 | * Successful HELLO healthcheck: |
| 815 | |
| 816 | HAPROXY AGENT SRV |
| 817 | | HAPROXY-HELLO | |
| 818 | | (healthcheck: true) | |
| 819 | | --------------------------> | |
| 820 | | | |
| 821 | | AGENT-HELLO + close() | |
| 822 | | <-------------------------- | |
| 823 | | | |
| 824 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 825 | |
| 826 | * Error encountered by agent during the HELLO handshake: |
| 827 | |
| 828 | HAPROXY AGENT SRV |
| 829 | | HAPROXY-HELLO | |
| 830 | | --------------------------> | |
| 831 | | | |
| 832 | | DISCONNECT + close() | |
| 833 | | <-------------------------- | |
| 834 | | | |
| 835 | |
| 836 | * Error encountered by HAProxy during the HELLO handshake: |
| 837 | |
| 838 | HAPROXY AGENT SRV |
| 839 | | HAPROXY-HELLO | |
| 840 | | --------------------------> | |
| 841 | | | |
| 842 | | AGENT-HELLO | |
| 843 | | <-------------------------- | |
| 844 | | | |
| 845 | | DISCONNECT | |
| 846 | | --------------------------> | |
| 847 | | | |
| 848 | | DISCONNECT + close() | |
| 849 | | <-------------------------- | |
| 850 | | | |
| 851 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 852 | * Notify / Ack exchange (unfragmented payload): |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 853 | |
| 854 | HAPROXY AGENT SRV |
| 855 | | NOTIFY | |
| 856 | | --------------------------> | |
| 857 | | | |
| 858 | | ACK | |
| 859 | | <-------------------------- | |
| 860 | | | |
| 861 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 862 | * Notify / Ack exchange (fragmented payload): |
| 863 | |
| 864 | HAPROXY AGENT SRV |
| 865 | | NOTIFY (frag 1) | |
| 866 | | --------------------------> | |
| 867 | | | |
| 868 | | UNSET (frag 2) | |
| 869 | | --------------------------> | |
| 870 | | ... | |
| 871 | | UNSET (frag N) | |
| 872 | | --------------------------> | |
| 873 | | | |
| 874 | | ACK | |
| 875 | | <-------------------------- | |
| 876 | | | |
| 877 | |
| 878 | * Aborted fragmentation of a NOTIFY frame: |
| 879 | |
| 880 | HAPROXY AGENT SRV |
| 881 | | ... | |
| 882 | | UNSET (frag X) | |
| 883 | | --------------------------> | |
| 884 | | | |
| 885 | | ACK/ABORT | |
| 886 | | <-------------------------- | |
| 887 | | | |
| 888 | | UNSET (frag X+1) | |
| 889 | | -----------X | |
| 890 | | | |
| 891 | | | |
| 892 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 893 | * Connection closed by haproxy: |
| 894 | |
| 895 | HAPROXY AGENT SRV |
| 896 | | DISCONNECT | |
| 897 | | --------------------------> | |
| 898 | | | |
| 899 | | DISCONNECT + close() | |
| 900 | | <-------------------------- | |
| 901 | | | |
| 902 | |
| 903 | * Connection closed by agent: |
| 904 | |
| 905 | HAPROXY AGENT SRV |
| 906 | | DISCONNECT + close() | |
| 907 | | <-------------------------- | |
| 908 | | | |
| 909 | |
| 910 | 3.2.4. Frame: HAPROXY-HELLO |
| 911 | ---------------------------- |
| 912 | |
| 913 | This frame is the first one exchanged between HAProxy and an agent, when the |
| 914 | connection is established. The payload of this frame is a KV-LIST. It cannot be |
| 915 | fragmented. STREAM-ID and FRAME-ID are must be set 0. |
| 916 | |
| 917 | Following items are mandatory in the KV-LIST: |
| 918 | |
| 919 | * "supported-versions" <STRING> |
| 920 | |
| 921 | Last SPOP major versions supported by HAProxy. It is a comma-separated list |
| 922 | of versions, following the format "Major.Minor". Spaces must be ignored, if |
| 923 | any. When a major version is announced by HAProxy, it means it also support |
| 924 | all previous minor versions. |
| 925 | |
| 926 | Example: "2.0, 1.5" means HAProxy supports SPOP 2.0 and 1.0 to 1.5 |
| 927 | |
| 928 | * "max-frame-size" <UINT32> |
| 929 | |
| 930 | This is the maximum size allowed for a frame. The HAPROXY-HELLO frame must |
| 931 | be lower or equal to this value. |
| 932 | |
| 933 | * "capabilities" <STRING> |
| 934 | |
| 935 | This a comma-separated list of capabilities supported by HAProxy. Spaces |
| 936 | must be ignored, if any. |
| 937 | |
Christopher Faulet | ba7bc16 | 2016-11-07 21:07:38 +0100 | [diff] [blame] | 938 | Following optional items can be added in the KV-LIST: |
| 939 | |
| 940 | * "healthcheck" <BOOLEAN> |
| 941 | |
| 942 | If this item is set to TRUE, then the HAPROXY-HELLO frame is sent during a |
| 943 | SPOE health check. When set to FALSE, this item can be ignored. |
| 944 | |
Christopher Faulet | a1cda02 | 2016-12-21 08:58:06 +0100 | [diff] [blame] | 945 | * "engine-id" <STRING> |
| 946 | |
| 947 | This is a uniq string that identify a SPOE engine. |
| 948 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 949 | To finish the HELLO handshake, the agent must return an AGENT-HELLO frame with |
| 950 | its supported SPOP version, the lower value between its maximum size allowed |
| 951 | for a frame and the HAProxy one and capabilities it supports. If an error |
| 952 | occurs or if an incompatibility is detected with the agent configuration, an |
| 953 | AGENT-DISCONNECT frame must be returned. |
| 954 | |
| 955 | 3.2.5. Frame: AGENT-HELLO |
| 956 | -------------------------- |
| 957 | |
| 958 | This frame is sent in reply to a HAPROXY-HELLO frame to finish a HELLO |
| 959 | handshake. As for HAPROXY-HELLO frame, STREAM-ID and FRAME-ID are also set |
| 960 | 0. The payload of this frame is a KV-LIST and it cannot be fragmented. |
| 961 | |
| 962 | Following items are mandatory in the KV-LIST: |
| 963 | |
| 964 | * "version" <STRING> |
| 965 | |
| 966 | This is the SPOP version the agent supports. It must follow the format |
| 967 | "Major.Minor" and it must be lower or equal than one of major versions |
| 968 | announced by HAProxy. |
| 969 | |
| 970 | * "max-frame-size" <UINT32> |
| 971 | |
| 972 | This is the maximum size allowed for a frame. It must be lower or equal to |
| 973 | the value in the HAPROXY-HELLO frame. This value will be used for all |
| 974 | subsequent frames. |
| 975 | |
| 976 | * "capabilities" <STRING> |
| 977 | |
| 978 | This a comma-separated list of capabilities supported by agent. Spaces must |
| 979 | be ignored, if any. |
| 980 | |
| 981 | At this time, if everything is ok for HAProxy (supported version and valid |
| 982 | max-frame-size value), the HELLO handshake is successfully completed. Else, |
| 983 | HAProxy sends a HAPROXY-DISCONNECT frame with the corresponding error. |
| 984 | |
Christopher Faulet | ba7bc16 | 2016-11-07 21:07:38 +0100 | [diff] [blame] | 985 | If "healthcheck" item was set to TRUE in the HAPROXY-HELLO frame, the agent can |
| 986 | safely close the connection without DISCONNECT frame. In all cases, HAProxy |
Ilya Shipitsin | 11057a3 | 2020-06-21 21:18:27 +0500 | [diff] [blame] | 987 | will close the connection at the end of the health check. |
Christopher Faulet | ba7bc16 | 2016-11-07 21:07:38 +0100 | [diff] [blame] | 988 | |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 989 | 3.2.6. Frame: NOTIFY |
| 990 | --------------------- |
| 991 | |
| 992 | Information are sent to the agents inside NOTIFY frames. These frames are |
| 993 | attached to a stream, so STREAM-ID and FRAME-ID must be set. The payload of |
| 994 | NOTIFY frames is a LIST-OF-MESSAGES and, if supported by agents, it can be |
| 995 | fragmented. |
| 996 | |
| 997 | NOTIFY frames must be acknowledge by agents sending an ACK frame, repeating |
| 998 | right STREAM-ID and FRAME-ID. |
| 999 | |
| 1000 | 3.2.7. Frame: ACK |
| 1001 | ------------------ |
| 1002 | |
| 1003 | ACK frames must be sent by agents to reply to NOTIFY frames. STREAM-ID and |
| 1004 | FRAME-ID found in a NOTIFY frame must be reuse in the corresponding ACK |
| 1005 | frame. The payload of ACK frames is a LIST-OF-ACTIONS and, if supported by |
| 1006 | HAProxy, it can be fragmented. |
| 1007 | |
| 1008 | 3.2.8. Frame: HAPROXY-DISCONNECT |
| 1009 | --------------------------------- |
| 1010 | |
| 1011 | If an error occurs, at anytime, from the HAProxy side, a HAPROXY-DISCONNECT |
| 1012 | frame is sent with information describing the error. HAProxy will wait an |
| 1013 | AGENT-DISCONNECT frame in reply. All other frames will be ignored. The agent |
| 1014 | must then close the socket. |
| 1015 | |
| 1016 | The payload of this frame is a KV-LIST. It cannot be fragmented. STREAM-ID and |
| 1017 | FRAME-ID are must be set 0. |
| 1018 | |
| 1019 | Following items are mandatory in the KV-LIST: |
| 1020 | |
| 1021 | * "status-code" <UINT32> |
| 1022 | |
| 1023 | This is the code corresponding to the error. |
| 1024 | |
| 1025 | * "message" <STRING> |
| 1026 | |
| 1027 | This is a textual message describing the error. |
| 1028 | |
| 1029 | For more information about known errors, see section "Errors & timeouts" |
| 1030 | |
| 1031 | 3.2.9. Frame: AGENT-DISCONNECT |
| 1032 | ------------------------------- |
| 1033 | |
| 1034 | If an error occurs, at anytime, from the agent size, a AGENT-DISCONNECT frame |
Michael Prokop | 4438c60 | 2019-05-24 10:25:45 +0200 | [diff] [blame] | 1035 | is sent, with information describing the error. such frame is also sent in reply |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1036 | to a HAPROXY-DISCONNECT. The agent must close the socket just after sending |
| 1037 | this frame. |
| 1038 | |
| 1039 | The payload of this frame is a KV-LIST. It cannot be fragmented. STREAM-ID and |
| 1040 | FRAME-ID are must be set 0. |
| 1041 | |
| 1042 | Following items are mandatory in the KV-LIST: |
| 1043 | |
| 1044 | * "status-code" <UINT32> |
| 1045 | |
| 1046 | This is the code corresponding to the error. |
| 1047 | |
| 1048 | * "message" <STRING> |
| 1049 | |
| 1050 | This is a textual message describing the error. |
| 1051 | |
| 1052 | For more information about known errors, see section "Errors & timeouts" |
| 1053 | |
| 1054 | 3.3. Events & Messages |
| 1055 | ----------------------- |
| 1056 | |
| 1057 | Information about streams are sent in NOTIFY frames. You can specify which kind |
| 1058 | of information to send by defining "spoe-message" sections in your SPOE |
| 1059 | configuration file. for each "spoe-message" there will be a message in a NOTIFY |
| 1060 | frame when the right event is triggered. |
| 1061 | |
| 1062 | A NOTIFY frame is sent for an specific event when there is at least one |
| 1063 | "spoe-message" attached to this event. All messages for an event will be added |
| 1064 | in the same NOTIFY frame. |
| 1065 | |
| 1066 | Here is the list of supported events: |
| 1067 | |
| 1068 | * on-client-session is triggered when a new client session is created. |
| 1069 | This event is only available for SPOE filters |
| 1070 | declared in a frontend or a listen section. |
| 1071 | |
| 1072 | * on-frontend-tcp-request is triggered just before the evaluation of |
| 1073 | "tcp-request content" rules on the frontend side. |
| 1074 | This event is only available for SPOE filters |
| 1075 | declared in a frontend or a listen section. |
| 1076 | |
| 1077 | * on-backend-tcp-request is triggered just before the evaluation of |
| 1078 | "tcp-request content" rules on the backend side. |
| 1079 | This event is skipped for SPOE filters declared |
| 1080 | in a listen section. |
| 1081 | |
| 1082 | * on-frontend-http-request is triggered just before the evaluation of |
| 1083 | "http-request" rules on the frontend side. This |
| 1084 | event is only available for SPOE filters declared |
| 1085 | in a frontend or a listen section. |
| 1086 | |
| 1087 | * on-backend-http-request is triggered just before the evaluation of |
| 1088 | "http-request" rules on the backend side. This |
| 1089 | event is skipped for SPOE filters declared in a |
| 1090 | listen section. |
| 1091 | |
| 1092 | * on-server-session is triggered when the session with the server is |
| 1093 | established. |
| 1094 | |
| 1095 | * on-tcp-response is triggered just before the evaluation of |
| 1096 | "tcp-response content" rules. |
| 1097 | |
| 1098 | * on-http-response is triggered just before the evaluation of |
| 1099 | "http-response" rules. |
| 1100 | |
| 1101 | |
| 1102 | The stream processing will loop on these events, when triggered, waiting the |
| 1103 | agent reply. |
| 1104 | |
| 1105 | 3.4. Actions |
| 1106 | ------------- |
| 1107 | |
| 1108 | An agent must acknowledge each NOTIFY frame by sending the corresponding ACK |
| 1109 | frame. Actions can be added in these frames to dynamically take action on the |
| 1110 | processing of a stream. |
| 1111 | |
| 1112 | Here is the list of supported actions: |
| 1113 | |
| 1114 | * set-var set the value for an existing variable. 3 arguments must be |
| 1115 | attached to this action: the variable scope (proc, sess, txn, |
Kevin Zhu | 730323e | 2018-06-01 05:38:00 +0200 | [diff] [blame] | 1116 | req or res), the variable name (a string) and its value. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1117 | |
| 1118 | ACTION-SET-VAR : <SET-VAR:1 byte><NB-ARGS:1 byte><VAR-SCOPE:1 byte><VAR-NAME><VAR-VALUE> |
| 1119 | |
| 1120 | SET-VAR : <1> |
| 1121 | NB-ARGS : <3> |
| 1122 | VAR-SCOPE : <PROCESS> | <SESSION> | <TRANSACTION> | <REQUEST> | <RESPONSE> |
| 1123 | VAR-NAME : <STRING> |
| 1124 | VAR-VALUE : <TYPED-DATA> |
| 1125 | |
| 1126 | PROCESS : <0> |
| 1127 | SESSION : <1> |
| 1128 | TRANSACTION : <2> |
| 1129 | REQUEST : <3> |
Christopher Faulet | a1cda02 | 2016-12-21 08:58:06 +0100 | [diff] [blame] | 1130 | RESPONSE : <4> |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1131 | |
| 1132 | * unset-var unset the value for an existing variable. 2 arguments must be |
| 1133 | attached to this action: the variable scope (proc, sess, txn, |
Kevin Zhu | 730323e | 2018-06-01 05:38:00 +0200 | [diff] [blame] | 1134 | req or res) and the variable name (a string). |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1135 | |
Christopher Faulet | 1002aac | 2016-12-09 17:41:54 +0100 | [diff] [blame] | 1136 | ACTION-UNSET-VAR : <UNSET-VAR:1 byte><NB-ARGS:1 byte><VAR-SCOPE:1 byte><VAR-NAME> |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1137 | |
Christopher Faulet | 1002aac | 2016-12-09 17:41:54 +0100 | [diff] [blame] | 1138 | UNSET-VAR : <2> |
| 1139 | NB-ARGS : <2> |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1140 | VAR-SCOPE : <PROCESS> | <SESSION> | <TRANSACTION> | <REQUEST> | <RESPONSE> |
| 1141 | VAR-NAME : <STRING> |
| 1142 | |
| 1143 | PROCESS : <0> |
| 1144 | SESSION : <1> |
| 1145 | TRANSACTION : <2> |
| 1146 | REQUEST : <3> |
Christopher Faulet | a1cda02 | 2016-12-21 08:58:06 +0100 | [diff] [blame] | 1147 | RESPONSE : <4> |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1148 | |
| 1149 | |
| 1150 | NOTE: Name of the variables will be automatically prefixed by HAProxy to avoid |
| 1151 | name clashes with other variables used in HAProxy. Moreover, unknown |
| 1152 | variable will be silently ignored. |
| 1153 | |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 1154 | 3.5. Errors & timeouts |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1155 | ---------------------- |
| 1156 | |
| 1157 | Here is the list of all known errors: |
| 1158 | |
| 1159 | STATUS CODE | DESCRIPTION |
| 1160 | ----------------+-------------------------------------------------------- |
| 1161 | 0 | normal (no error occurred) |
| 1162 | 1 | I/O error |
| 1163 | 2 | A timeout occurred |
| 1164 | 3 | frame is too big |
| 1165 | 4 | invalid frame received |
| 1166 | 5 | version value not found |
| 1167 | 6 | max-frame-size value not found |
| 1168 | 7 | capabilities value not found |
| 1169 | 8 | unsupported version |
| 1170 | 9 | max-frame-size too big or too small |
Christopher Faulet | d1307ce | 2017-02-27 21:59:39 +0100 | [diff] [blame] | 1171 | 10 | payload fragmentation is not supported |
| 1172 | 11 | invalid interlaced frames |
| 1173 | 12 | frame-id not found (it does not match any referenced frame) |
| 1174 | 13 | resource allocation error |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1175 | 99 | an unknown error occurrde |
| 1176 | ----------------+-------------------------------------------------------- |
| 1177 | |
| 1178 | An agent can define its own errors using a not yet assigned status code. |
| 1179 | |
Christopher Faulet | ea62c2a | 2016-11-14 10:54:21 +0100 | [diff] [blame] | 1180 | IMPORTANT NOTE: By default, for a specific stream, when an abnormal/unexpected |
| 1181 | error occurs, the SPOE is disabled for all the transaction. So |
| 1182 | if you have several events configured, such error on an event |
Ilya Shipitsin | 11057a3 | 2020-06-21 21:18:27 +0500 | [diff] [blame] | 1183 | will disabled all following. For TCP streams, this will |
Christopher Faulet | ea62c2a | 2016-11-14 10:54:21 +0100 | [diff] [blame] | 1184 | disable the SPOE for the whole session. For HTTP streams, this |
| 1185 | will disable it for the transaction (request and response). |
| 1186 | See 'option continue-on-error' to bypass this limitation. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1187 | |
Joseph Herlant | 71b4b15 | 2018-11-13 16:55:16 -0800 | [diff] [blame] | 1188 | To avoid a stream to wait undefinetly, you must carefully choose the |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1189 | acknowledgement timeout. In most of cases, it will be quiet low. But it depends |
| 1190 | on the responsivness of your service. |
| 1191 | |
| 1192 | You must also choose idle timeout carefully. Because connection with your |
| 1193 | service depends on the backend configuration used by the SPOA, it is important |
| 1194 | to use a lower value for idle timeout than the server timeout. Else the |
| 1195 | connection will be closed by HAProxy. The same is true for hello timeout. You |
| 1196 | should choose a lower value than the connect timeout. |
| 1197 | |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 1198 | 4. Logging |
| 1199 | ----------- |
| 1200 | |
| 1201 | Activity of an SPOE is logged using HAProxy's logger. The messages are logged |
| 1202 | in the context of the streams that handle the client and the server |
| 1203 | connections. A message is emitted for each event or group handled by an |
| 1204 | SPOE. Depending on the status code, the log level will be different. In the |
| 1205 | normal case, when no error occurred, the message is logged with the level |
| 1206 | LOG_NOTICE. Otherwise, the message is logged with the level LOG_WARNING. |
| 1207 | |
Christopher Faulet | 3b8e349 | 2018-03-26 17:20:58 +0200 | [diff] [blame] | 1208 | The messages are logged using the agent's logger, if defined, and use the |
| 1209 | following format: |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 1210 | |
Christopher Faulet | 6e0d5e7 | 2018-04-26 14:25:43 +0200 | [diff] [blame] | 1211 | SPOE: [AGENT] <TYPE:NAME> sid=STREAM-ID st=STATUS-CODE reqT/qT/wT/resT/pT \ |
Christopher Faulet | caf2fec | 2018-04-04 10:25:50 +0200 | [diff] [blame] | 1212 | <idles>/<applets> <nb_sending>/<nb_waiting> <nb_error>/<nb_processed> |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 1213 | |
| 1214 | AGENT is the agent name |
| 1215 | TYPE is EVENT of GROUP |
| 1216 | NAME is the event or the group name |
| 1217 | STREAM-ID is an integer, the unique id of the stream |
| 1218 | STATUS_CODE is the processing's status code |
| 1219 | reqT/qT/wT/resT/pT are the following time events: |
| 1220 | |
| 1221 | * reqT : the encoding time. It includes ACLs processing, if any. For |
| 1222 | fragmented frames, it is the sum of all fragments. |
| 1223 | * qT : the delay before the request gets out the sending queue. For |
| 1224 | fragmented frames, it is the sum of all fragments. |
Joseph Herlant | 71b4b15 | 2018-11-13 16:55:16 -0800 | [diff] [blame] | 1225 | * wT : the delay before the response is received. No fragmentation |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 1226 | supported here. |
| 1227 | * resT : the delay to process the response. No fragmentation supported |
Christopher Faulet | 36bda1c | 2018-03-22 09:08:20 +0100 | [diff] [blame] | 1228 | here. |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 1229 | * pT : the delay to process the event or the group. From the stream |
Christopher Faulet | 36bda1c | 2018-03-22 09:08:20 +0100 | [diff] [blame] | 1230 | point of view, it is the latency added by the SPOE processing. |
| 1231 | It is more or less the sum of values above. |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 1232 | |
Christopher Faulet | caf2fec | 2018-04-04 10:25:50 +0200 | [diff] [blame] | 1233 | <idle> is the numbers of idle SPOE applets |
| 1234 | <applets> is the numbers of SPOE applets |
| 1235 | <nb_sending> is the numbers of streams waiting to send data |
| 1236 | <nb_waiting> is the numbers of streams waiting for a ack |
| 1237 | <nb_error> is the numbers of processing errors |
| 1238 | <nb_processed> is the numbers of events/groups processed |
| 1239 | |
| 1240 | |
Christopher Faulet | b2dd1e0 | 2018-03-22 09:07:41 +0100 | [diff] [blame] | 1241 | For all these time events, -1 means the processing was interrupted before the |
| 1242 | end. So -1 for the queue time means the request was never dequeued. For |
| 1243 | fragmented frames it is harder to know when the interruption happened. |
Christopher Faulet | f7e4e7e | 2016-10-27 22:29:49 +0200 | [diff] [blame] | 1244 | |
| 1245 | /* |
| 1246 | * Local variables: |
| 1247 | * fill-column: 79 |
| 1248 | * End: |
| 1249 | */ |