Movatterモバイル変換


[0]ホーム

URL:


  • Light
  • Dark
  • System

API Objects Reference

L4 farm

This page applies to:

  • HAProxy ALOHA - all versions

A farm is a container for real servers. The contained servers must have the same role and deliver the same service.

Farm attributes and options define the session behavior on the server side of the load balancer, such as how to check, dispatch connections, connect, forward data, and maintain sessions to real servers.

Farms are identified by a name; allowed characters include alpha-numeric, dot, dash, and underscore.

The available farm attributes are listed below:

balanceJump to heading

  • Definition: Load balancing algorithm used to dispatch new connections on real servers.

  • Type: enum

  • Default value:roundrobin

ValueDescription
roundrobinEach server is used in turn according to their weights.
least-connectionsThe new connection is affected to the server with the lowest number of connections.
hash-sourceThe source IP address is hashed and divided by the total weight of the running servers to designate which server will receive the request. This ensures that the same client IP address will always reach the same server as long as no server goes down or up.
hash-destinationAssigns jobs to servers through looking up a statically assigned hash table based on destination IP addresses.
hash-source-destAssigns jobs to servers through looking up a statically assigned hash table based on both source and destination IP addresses.
shortest-expected-delayAssign an incoming job to the server with the shortest expected delay.
never-queueAssign an incoming job to an idle server if there is one instead of waiting for a fast one; if all the servers are busy, it adopts the Shortest Expected Delay policy to assign the job.

modeJump to heading

  • Definition: Deployment mode

  • Type: enum

  • Default value: Destination IP masquerading

ValueDescription
gatewayDirect routing or direct server return (DSR) mode
natDestination IP masquerading (Network Address Translation, or NAT)
tunnelipip encapsulation (tunneling)

persistenceJump to heading

  • Definition: If this option is enabled, multiple requests from a client (same source IP) are redirected to the same real server selected for the first request. This option may be used in conjunction with protocols such as SSL or FTP where it is important that clients consistently connect with the same real server.

  • Type: enum

  • Default value: Persistence is disabled

ValueDescription
enabledpersistence is enabled

persistence-timeoutJump to heading

Info

This attribute is ignored ifpersistence is not set toenabled.

  • Definition: Value in seconds specify how long sessions are kept persistence load balance table.

  • Type: integer

  • Default value: 300 seconds

persistence-netmaskJump to heading

Info

This attribute is ignored ifpersistence is not set toenabled.

  • Definition: Specify the granularity of persistence

  • Type: ip

  • Default value: 255.255.255.255

service-addressJump to heading

  • Definition: IP address on which to intercept traffic

  • Type: ip

  • Default value: no interception

service-portJump to heading

Info

This attribute is ignored unlessservice-address is configured.

  • Definition: network port to intercept traffic on

  • Type: port

  • Default value: all ports for the service-address are intercepted

  • Particular value: 0 means interception of all ports

service-protocolJump to heading

Info

This attribute is ignored unlessservice-address is configured.

  • Definition: layer 4 protocol (udp or tcp) to intercept

  • Type: enum

  • Default value: tcp is intercepted

ValueDescription
tcpintercept tcp
udpintercept udp

check-intervalJump to heading

  • Definition: Interval between two consecutive server health checks in seconds

  • Type: integer

  • Default value:10

check-portJump to heading

  • Definition: Destination TCP port used to perform health check

  • Type: integer

  • Default value: Server port is used

check-timeoutJump to heading

  • Definition: Additional health check timeout, starts after the connection has been established on the server

  • Type: integer

  • Default value:check-interval/2

check-sourceJump to heading

  • Definition: Source IP address to use when performing health checks

  • Type: ip

  • Default value: First load balancer interface address is used

adv-checkJump to heading

  • Definition: Advanced health check method

  • Type: enum

  • Default value:icmp

ValueDescription
httpUse an http request health checks for server testing, If http status code 200 is returned, check is successful
tcpPerform a tcp connect. If connect accepted, check is successful
icmpprocess an icmp echo to server, if echo reply received, check is successful

adv-check-http-uriJump to heading

Info

This attribute is ignored unlessadv-check is set tohttp.

  • Definition: Requested URI for HTTP health check

  • Type: string

  • Default value:/

adv-check-http-status-codeJump to heading

Info

This attribute is ignored unlessadv-check is set tohttp.

  • Definition: HTTP status code value to consider check successful

  • Type: integer

  • Default value:200

Your feedback is important to us!

This site is protected by reCAPTCHA and theGoogle Privacy Policy andTerms of Service apply.

Do you have any suggestions on how we can improve the content of this page?

Previous page API Objects Reference Next page L4 server
© 2026 HAProxy Technologies, LLC. All Rights Reserved
Manage Cookie Preferences

Privacy Settings

HAProxy's website uses cookies. By proceeding, you consent to our cookie usage. Please see our Privacy Policy and Cookie Policy for cookie usage details and instructions on how to disable cookies.
Privacy and Cookie Policy More information
Show details
Consent date:
User Unique Id:
Deny
Save Accept and close

[8]ページ先頭

©2009-2026 Movatter.jp