Another helpful page: http://www.cnpbagwell.com/mac-os-x/bonjour-sleep-proxy
Before the client goes to sleep, it must register with the server. It does this by sending a unicast Dynamic DNS Update which contains at a minimum a list of the TCP services (using SRV and TXT records) that should cause the computer to wake up, a Dynamic DNS Update Lease OPT record and a EDNS0 Owner OPT record directly to the server name and port from previous query.
and then
If someone attempts to establish a TCP connect to one of the services, the packet will be sent to server because of the ARP response. The server will detect this and send out a magic packet to wake the client but doesnât respond to the TCP connection request. Once client awakes, it sends its own gratuitous ARP which reroutes the initial TCP connection packets to client and it responds to complete connection.
I guess macOS is doing all this, but it only registers the services it knows about with the sleep proxy. Since weâre running our own mdns server advertising services, they donât get registered with the sleep proxy, and hence port 8089 access does not trigger a wake-up.