We are working with a customer to move their apps over to Azure, and one of the threads involves moving from HAproxy servers to App Gateway. As part of this the customer has outlined a number of technical requirements that are possible with HAproxy, and we are trying to map that back to AppGateway capabilities. I have outlined the specifics below with links and excerpts from HAproxy documentation. If anyone else has tried to do this in the past and have had success, would be great if you could please share.
Option redispatch
In HTTP mode, if a server designated by a cookie is down, clients may definitely stick to it because they cannot flush the cookie, so they will not be able to access the service anymore.
Specifying "option redispatch" will allow the proxy to break their persistence and redistribute them to a working server.
It also allows to retry last connection to another server in case of multiple connection failures. Of course, it requires having "retries" set to a nonzero value.
Option http-server-close
the server-facing connection is closed once the end of the response has been received, but the client-facing connection remains open.
Option abortonclose
By default (without the option) the behaviour is HTTP
compliant and aborted requests will be served. But when the option is
specified, a session with an incoming channel closed will be aborted while
it is still possible, either pending in the queue for a connection slot, or
during the connection establishment if the server has not yet acknowledged
the connection request. This considerably reduces the queue size and the load
on saturated servers when users are tempted to click on STOP, which in turn
reduces the response time for other users.
Option splice-auto
When this option is enabled either on a frontend or on a backend, haproxy
will automatically evaluate the opportunity to use kernel tcp splicing to
forward data between the client and the server, in either direction.
Equivalent app gateway commands to set timeout values:
timeout connect 10s
timeout client 10m
timeout server 10m
timeout queue 10s
timeout http-keep-alive 3s