Coyote Point Systems Equalizer Spezifikationen Seite 383

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 594
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 382
By default, server agents are disabled on all new server pools. To enable server agents for a server pool, you need
to write the agent, install and run it on each server pool in the cluster, and then enable server agents for the server
pool on Equalizer.
Agent Probe Process
When Equalizer connects to the port on which the server agent is running, it uses the number returned by the agent
in its load balancing calculations, with the server agent policy giving highest preference to the server agent’s return
value over other factors.
The number returned by the agent to Equalizer is intended to indicate the current load on the server. The agent
application that runs on the server can be written in any available scripting or programming language and can use
any appropriate method to determine server load. By default, the result must be an integer between -1 and 100
returned on the server agent port.
When enabled, server agents should be running on all server instances in the server pool; however, by default, a
server is not marked down when an agent value is not returned. Equalizer continues load balancing without the
server agent return value unless the health check instance flag Require Response (require_response) flag is
enabled; if it is, Equalizer must receive an agent response or the server is marked down.
Sample Server Agent
You can create custom Server Agents as shell scripts, or in Java, Perl, C, or other languages. The code snippet
below is an example of a simple server agent example written in Perl. This code assumes that an integer response
value is supplied on the command line and returns that value when a connection is made on port 1510 (configurable
via the server instance Probe Port (probe_port) variable). This sample agent is intended for testing purposes
only. In a real deployment, the server agent would determine the response value to return by polling system
resources, or some other real-time method.
#!/usr/bin/perl -w
# serveragent.pl
#--------------------
#(c) Copyright 2013 Fortinet, Inc.
use strict;
use Socket;
# use port 1510 as default
my $port = 1510;
my $proto = getprotobyname('tcp');
# take the server agent response value from the command line
my $response = shift;
# response has to be a valid server agent response
$response==-1 or ($response > 0 and $response<101)
or die "Response must be between -1 and 100";
# create a socket and set the options, set up listen port
socket(SERVER, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, 1) or die "setsock: $!";
my $paddr = sockaddr_in($port, INADDR_ANY);
Copyright © 2013 Coyote Point Systems. A subsidiary of Fortinet, Inc.
All Rights Reserved.
383
Equalizer Administration Guide
Seitenansicht 382
1 2 ... 378 379 380 381 382 383 384 385 386 387 388 ... 593 594

Kommentare zu diesen Handbüchern

Keine Kommentare