Is using Remove-AzApplicationGatewayBackendAddressPool and removing completely the instance from the backend-pool the only way to explicitly deregister an instance?
Isn't there something similar to other gateways where you disable it but not remove it from the pool?
I know you can deregister with a custom health probe but I need to do it explicitly since according to Microsoft:
Connection draining helps you achieve graceful removal of backend pool members during planned service updates. This setting is enabled via the backend http setting and can be applied to all members of a backend pool during rule creation. Once enabled, Application Gateway ensures all deregistering instances of a backend pool don't receive any new request while allowing existing requests to complete within a configured time limit. This applies to both backend instances that are explicitly removed from the backend pool by a user configuration change, and backend instances that are reported as unhealthy as determined by the health probes. The only exception to this are requests bound for deregistering instances, which have been deregistered explicitly, because of gateway-managed session affinity and continues to be proxied to the deregistering instances.
You can only keep drain connections while keeping session affinity by explicitly deregistering the instance. That is, after the instance is deregistered the users with sessions in the instance that was deregistered must continue the connection to that instance.
Thanks.