For T119797, we need a fast way to determine the client connection speed in Varnish and either vary the response accordingly (so we serve HTML with low-res images for clients on slow connections) or set a cookie, so that client-side code can rewrite the page to use low-res variants.
We have a subscription to MaxMind's GeoIP2 Connection Speed database, so presumably the varnish GeoIP code could be updated to utilize that.