Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Mesma porta Externa para Servidores diferentes

    Scheduled Pinned Locked Moved Portuguese
    5 Posts 3 Posters 673 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Vitor Geronutti
      last edited by

      Olá pessoal,

      Tenho um serviço no meu servidor que funciona na porta 80 (externa e interna), porém está havendo muitas requisições e vou subir um novo servidor para aliviar a requisição na porta 80
      Com isso preciso criar o balanceamento para hora ir pra um servidor, hora ir pra outro.
      Sei que isso pode ser realizado pelo HAProxy, porém encontrei algumas orientações que não funcionaram

      Alguém poderia me ajudar por favor nessa orientação, com essa ferramenta ou de alguma outra maneira que posso fazer esse procedimento?

      Obrigado

      1 Reply Last reply Reply Quote 0
      • H
        Hugovsky
        last edited by

        Tens de usar o haproxy.Não há outra forma. Eu estou a usar e funciona. Pode é ser um pouco complicado de configurar.

        P 1 Reply Last reply Reply Quote 0
        • P
          PiBa @Hugovsky
          last edited by

          @Hugovsky
          There is always another way.. (pfSense's own loadbalancer / squid-reverse-proxy / .?.)

          But haproxy should indeed be able to do the job just fine.

          @Vitor-Geronutti can share your haproxy.cfg from bottom of settings tab so we can maybe tell what needs to be adjusted?

          1 Reply Last reply Reply Quote 0
          • V
            Vitor Geronutti
            last edited by

            Olá,

            Como não conseguir o resultado esperado, acabei deletando o serviço. Teria algum manual para essa configuração com o HAProxy

            A ideia é:
            Um site institucional, que será alocado em dois servidores. Hora a conexão irá pra um servidor, hora pra outro.

            Desde já agradeço.

            P 1 Reply Last reply Reply Quote 0
            • P
              PiBa @Vitor Geronutti
              last edited by

              @vitor-geronutti
              There seems little need to write such thing in a manual.?

              1 - Create a backend
              2 - Add 2 servers to the backend
              3 - Create Frontend, and select the default-backend made at step 1
              4 - configure a ip:port for the frontend to listen on
              5 - configure a firewall rule on your WAN to allow access

              Done?

              If not please share your haproxy.cfg, and check on the stats page that servers are up.
              Troubleshooting: https://github.com/PiBa-NL/pfsense-haproxy-package-doc/wiki/haproxy_troubleshooting

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.