flyctl ping

I know you’ve all been waiting for this and finally it’s arrived.

In the master branch on flyctl, for those of you building your own, you can now flyctl ping your instances, or your gateway. This’ll land in a release probably sometime in the next couple days.

flyctl ping -o orgname gateway will ping the upstream WireGuard gateway for a particular organization (making a WireGuard peer if none exists — this is now pretty fast). This is probably a better test of gateway connectivity than the DNS check we were doing previously.

flyctl ping -o orgname app.internal will ping all the running instances for app. If you have a lot of instances for an app, you may trip a (harmless) rate limit on our gateways, or maybe an ICMP bug in the netstack code we’re using in flyctl.

You can also flyctl ping -o orgname top1.nearest.of.app.internal to just ping the closest host, or flyctl ping -o orgname nrt.app.internal to only ping your instances in the nrt region (the target argument to ping is just a hostname in our DNS).

It was a galactic PITA to get this working as much as it is now (wireguard-go’s netstack bindings didn’t have ICMP support, and netstack’s ICMP support is… weird) but I know how much you all love pinging things.

6 Likes

Nice, that is handy functionality @Thomas .

Do you have any suggestions for pinging from our boxes to other 3rd party resources? We are trying to profile the latency between Fly regions and our MongoDB instances. With other PaaS I am able to ssh into the box and either run ping directly or npm install tcp-ping and then run node and ping from there.

Thanks for the help.

You can definitely install ping, or an NPM Ping library, and ping out from your instance — either from flyctl ssh (you can flyctl ssh -C ping to run it directly), or as something baked into your Dockerfile.

hmm, I think the issue is that i am using the Heroku image, so I don’t have the manual Docker file setup.
Additionally, when I ssh into the box, I can’t seem to start a node process from the command line.
Any ideas? Thanks.