Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

5.5. Backend Settings

download PDF
The backend settings specify the real server IP addresses as well as the load balancer scheduling algorithm. The following example shows a typical backend section:

backend app
   balance     roundrobin
   server  app1 192.168.1.1:80 check
   server  app2 192.168.1.2:80 check
   server  app3 192.168.1.3:80 check inter 2s rise 4 fall 3
   server  app4 192.168.1.4:80 backup
The back-end server is named app. The balance specifies the load balancer scheduling algorithm to be used, which in this case is Round Robin (roundrobin), but can be any scheduler supported by HAProxy. For more information configuring schedulers in HAProxy, see Section 5.1, “HAProxy Scheduling Algorithms”.
The server lines specify the servers available in the back end. app1 to app4 are the names assigned internally to each real server. Log files will specify server messages by name. The address is the assigned IP address. The value after the colon in the IP address is the port number to which the connection occurs on the particular server. The check option flags a server for periodic healthchecks to ensure that it is available and able receive and send data and take session requests. Server app3 also configures the healthcheck interval to two seconds (inter 2s), the amount of checks app3 has to pass to determine if the server is considered healthy (rise 4), and the number of times a server consecutively fails a check before it is considered failed (fall 3).
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.