Jesse Thompson > Net-Proxy-Connector-tcp_balance-0.002 > Net::Proxy::Connector::tcp_balance

Download:
Net-Proxy-Connector-tcp_balance-0.002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.002   Source  

NAME ^

Net::Proxy::Connector::tcp_balance

VERSION ^

version 0.002

SYNOPSIS ^

    # sample proxy using Net::Proxy::Connector::tcp_balance
    use Net::Proxy;
    use Net::Proxy::Connector::tcp_balance; # optional

    # proxy connections from localhost:6789 to remotehost:9876
    # using standard TCP connections
    my $proxy = Net::Proxy->new(
        {   in  => { type => 'tcp', port => '6789' },
            out => { type => 'tcp_balance', hosts => [ 'remotehost1', 'remotehost2' ], port => '9876' },
        }
    );
    $proxy->register();

    Net::Proxy->mainloop();

NAME ^

Net::Proxy::Connector::tcp_balance - connector for outbound tcp balancing and failover

DESCRIPTION ^

Net::Proxy::Connector::tcp_balance is an outbound tcp connector for Net::Proxy that provides randomized load balancing and also provides failover when outbound tcp hosts are unavailable.

It will randomly connect to one of the specified hosts. If that host is unavailable, it will continue to try the other hosts until it makes a connection.

The capabilities of the Net::Proxy::Connector::tcp_balance are otherwise identical to those Net::Proxy::Connector::tcp

CONNECTOR OPTIONS ^

The connector accept the following options:

in

out

AUTHOR ^

Jesse Thompson <zjt@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Jesse Thompson.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: