Why do my Join messages take so long to arrive at times? Sometimes it’s instant, but sometimes it seems to take for ever!

Android’s push notification listener might be timing out on your phone/router.

Try this app to fix it.

Here‘s a reddit post explaining the issue. Thanks to Kristijan Ristovski for pointing me to the reddit article.

Also, this is what Google has to say about network settings:

If your organization has a firewall that restricts the traffic to or from the Internet, you’ll need to configure it to allow connectivity with GCM. The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but it sometimes uses 5229 and 5230. GCM doesn’t provide specific IPs. It changes IPs frequently. We recommend against using ACLs but if you must use them, take a broad approach such as the method suggested in this support link.