The GeoIP C API that we use in VCL to geolocate the client IP address supports using the MaxMind Netspeed database to determine the client connection speed.
Example code:
https://github.com/maxmind/geoip-api-c/blob/master/test/test-geoip-netspeed.c
We already have a subscription for the database (@kevinator or @Nuria should know the details), so it is presumably a matter of deploying the database files to the cache boxes and updating the VCL code in operations/puppet.git:templates/varnish/geoip.inc.vcl.erb to utilize it.
See T119797: Serve low-res images by default to users on slow or metered mobile connections for use-case.