ILXFlow¶
new ILXFlow()
- Since:
- BIP-IP TMOS 13.0
An ILXFlow is created by the ILXPlugin class ` <ILXPlugin.html#event:connect>`__
ILXPlugin#event:connect
event. The flow represents an end to end connection from the client, through a BigIP, to the server. There are client side (ILXFlow.client) and server side streams (ILXFlow.server) available.
Properties:
Name | Type | Description | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
client
|
ILXStream | The client ILXStream object. | |||||||||||||||||
server
|
ILXStream | The server ILXStream object. | |||||||||||||||||
virtual
|
object | Object with clientside virtual server metadata associated with the flow. Propertie
1
|
|||||||||||||||||
lb
|
ILXFlow~lb | ILXFlow~lb
object |
Listens to Events:
Example:
var f5 = require('f5-nodejs');
var plugin = new f5.ILXPlugin();
plugin.on('connect', function(flow) {
flow.client.on('requestComplete', function(request) {
<some code using ILXStream object>
request.complete();
});
// Register callbacks for error events. Errors events must be caught.
flow.client.on('error', function(errorText) {
console.log('client error event: ' + errorText);
});
flow.server.on('error', function(errorText) {
console.log('server error event: ' + errorText);
});
flow.on('error', function(errorText) {
console.log('flow error event: ' + errorText);
});
});
var options = new f5.ILXPluginOptions();
options.handleServerData = false;
options.handleClientData = false;
plugin.start(options);
Methods¶
destroy()¶
Immediate shutdown of client and server streams. Flow is no longer usable.
detach()¶
Detach the flow, including both client and server streams from the tmm. Data will continue to flow to and from the client and server but the plugin is no longer in the loop. The plugin receives no further data events for this stream. This will increase performance of applications that inspect a relatively small amount of traffic at the beginning of a connection, while allowing the remainder of the connection to be processed entirely by the BigIP tmm.
Note that for Node.js to properly shutdown the client and server streams the close event will be emitted. Any actions performed on a stream that has been detached will result in an exception.
Example:¶
plugin.on('connect', function(flow) {
if (flow.client.remoteAddress === '<some_ip>') flow.detach();
});
end()¶
lbSelect(lbOptions)¶
Specify that the system connect to a specific virtual, pool or server.
Note: For a load balancing selection to be made the plugin must enable the plugin option
ILXPluginOptions.handleClientOpen
and must be called before
flow.client.allow()
. Also, data should not be written to the
ILXFlow.server
stream until after the load balancing selection has been made.
Parameters:¶
Name | Type | Description |
---|---|---|
lbOptions
|
ILXLbOptions | ILXLbOptions object |
Example:¶
// URI path based pool selection
var f5 = require('f5-nodejs');
var plugin = new f5.ILXPlugin();
plugin.on('connect', function(flow) {
flow.client.on('requestComplete', function(request) {
var otherPoolMatch = '/images/';
if (request.params.uri.slice(0, otherPoolMatch.length) === otherPoolMatch) {
var options = new f5.ILXLbOptions();
options.pool = '/Common/other_pool';
flow.lbSelect(options);
}
flow.client.allow();
request.complete();
});
flow.client.on('error', function(errorText) {
console.log('client error event: ' + errorText);
});
flow.server.on('error', function(errorText) {
console.log('server error event: ' + errorText);
});
flow.on('error', function(errorText) {
console.log('flow error event: ' + errorText);
});
});
var options = new f5.ILXPluginOptions();
options.handleServerData = false;
options.handleServerResponse = false;
options.handleClientData = false;
options.handleClientOpen = true;
plugin.start(options);
setTraceLevel(level, streams)¶
Parameters:¶
Type Definitions¶
lb¶
Serverside information about the load balancing selection made by/for the flow. Available only after ` <ILXStream.html#event:connect>`__
ILXStream#event:connect
, ` <ILXStream.html#event:responseStart>`__
ILXStream#event:responseStart
and ` <ILXStream.html#event:responseComplete>`__
ILXStream#event:responseComplete
events.
Type:¶
- object
Properties:¶
Name | Type | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
virtualServer
|
string | This will be undefined unless the connection was load balanced to a virtual server (vs targeting vs) | ||||||||||||||
pool
|
string | LTM pool name, will be undefined if ILXFlow.lb.virtualSer ver is not undefined. | ||||||||||||||
remote
|
object | Remote server information (dest IP info on serverside connection) Propertie
3
|
||||||||||||||
vlan
|
number | Numeric VLAN ID used for the connection to the server. This will be zero in the case of vs targeting vs. | ||||||||||||||
nexthop
|
string | MAC address, undefined if the nexthop is all zeros | ||||||||||||||
snatpool
|
string | SNAT pool name, if SNAT is enabled | ||||||||||||||
local
|
object | Information connection information (source IP info on server side connection) Propertie
4
|
Events¶
close¶
error¶
Parameters:¶
Name | Type | Description |
---|---|---|
msg
|
string | error text |
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.