Located in London, I measured the RTT or round trip time to 574,691 random webservers and plotted the times on the globe.

Discovery was done with masscan, measurements using hping and plotting with an old Python script I’ve revived and enhanced.

This is part of the next writeup on my blog, with which I will be posting any of the code I’ve used.

Blog / How I made a blog using Lemmy

    • kernelle@0d.gsOP
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      This is an Azimuthal projection with viridis, tried a few but liked this one the best!

    • kernelle@0d.gsOP
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      Looks great I’ll be checking different color scales, I’m still figuring out the plotting library though.

    • kernelle@0d.gsOP
      link
      fedilink
      arrow-up
      20
      ·
      2 days ago

      Thanks! The coolest part IMO is when you overlay it with the subnautical fiber optic network. The north of spain, the US east coast, South-Africa, Brazil, etc all show almost exactly where these cables connect the continents.

  • adeoxymus@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    edit-2
    2 days ago

    Could you calculate shortest distance to each point (using for example haversine formula) and then divide each time you got by 2*distance/c to get some sort of normalized score for connectivity? Anything closely approaching 1 would be the optimal connectivity to that destination.

    Edit: c would be speed of light

    • kernelle@0d.gsOP
      link
      fedilink
      arrow-up
      10
      ·
      2 days ago

      Great idea! I’ll be writing some code later to calculate distances first.

      • adeoxymus@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        2 days ago

        Cool I’m super interested in the result. I’m marking the post!

        Edit: I also love the visualizations, didn’t make that clear in first reply 🫣

        • kernelle@0d.gsOP
          link
          fedilink
          arrow-up
          6
          ·
          2 days ago

          Hard to get the scaling right but I messed around a bit, here’s RTT / (2 * Distance / c )

          Scaling on Europe is fun too

          • adeoxymus@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            1 day ago

            Super cool plot! Few questions, I was trying to read the scale bar. It says RTT/(1-(2*distance/c)). I guess that’s a typo? otherwise I’m not sure what it would mean.

            Then the scaling goes up to 10, did you multiply by 10 or did you inverse the values? (Inverting would mean higher values = lower connectivity? which I guess is possible in Europe if we have to consider the routing ?).
            Also it’s very interesting how uniform the whole American continent is.

            • kernelle@0d.gsOP
              link
              fedilink
              arrow-up
              2
              ·
              1 day ago

              Ah yeah ofcourse I was experimenting with comparing it with the lightspeed itself, then inverting it with -1 so its coloured correctly. My mistake not changing the label enough.

              Then the scaling goes up to 10

              That is actually the real scale, in Europe we get theoretical speeds of 2-3ms according to the speed of light. Real RTT’s in Amsterdam for example are around 20ms, so you get values >10. The further you go from the EU, the closer to ideal times.

              It’s interesting to see the places where connectivity is much better or worse than the surrounding areas.

                • kernelle@0d.gsOP
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 day ago

                  That was experimenting, the actual graph shown is the other way around, so it shows the real differences, not just compared to lightspeed (ie I forgot to remove the ‘1 -’ from the label)

            • kernelle@0d.gsOP
              link
              fedilink
              arrow-up
              2
              ·
              1 day ago

              I’m thinking its harder to get sub 15ms consistently maybe? Brussels, Amsterdam, Paris, expected lightspeed times of 1-2ms, in reality you’ll get 10-20ms.

              Global internet is optimized for global connectivity, I’m imagining resources are better spent optimizing the 50-200ms range than the 1-10ms.

    • unexposedhazard@discuss.tchncs.de
      link
      fedilink
      arrow-up
      8
      ·
      2 days ago

      In normal fiber optic cables the signal only travels at ~60% of speed of light. I dont think hollow core fibers are widely adopted yet for undersea cables, so the results should reflect that. Ofcourse you also have delays due to the relay stations in between, but those are probably quite small.

      • foofiepie@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        2 days ago

        Is there an ELI5 for fiber optic questions? Am interested in how they’re made, properties of different types, and how signals are sent/repeated etc.

        • unexposedhazard@discuss.tchncs.de
          link
          fedilink
          arrow-up
          9
          ·
          edit-2
          2 days ago

          Im too dumb to do real ELI5, but basically fibers are never perfect and light will never travel perfectly straight through it and instead bounce around unpredictably inside the material. So the the actual distance that the light has to travel to get to the target is much larger than the length of the fiber.

          To get the latency down you want to the light to travel uninhibited. To achieve this people have come up with “hollow core” fibers which are basically just very long, very thin, very precise tubes with a vacuum inside that light travels through. The following pic shows what these look like.

          Light will still not travel perfectly straight in these but it will only be able to bounce off the walls and not off any imperfections in the fiber material (because there is none). Here the travel time is decided by how straight you can inject your light beam into the hole. The last pic with the glass pane shows what would happens if its not very straight…

          • naeap@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            4
            ·
            2 days ago

            Thank you very much for that in-depth explanation!
            If you have any more of that, I’d be very interested :⁠-⁠)

            • unexposedhazard@discuss.tchncs.de
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              1 day ago

              This is just what i picked up from my colleagues at work while i was helping them with electronics trouble in their lab. They are doing research using attosecond length laser pulses, which is why they needed to use hollow core stuff to keep the signal fast and clean. If you dont remember what atto means those pulses are 0.000000000000000001 seconds long (well in that range not actually 1 attosec more like tens to hundreds of attosecs). But yeah thats all i know ^^

              For more technical details from Wikipedia:

              Optical fiber > Refractive index

              The refractive index is a way of measuring the speed of light in a material. Light travels fastest in a vacuum, such as in outer space. The speed of light in vacuum is about 300,000 kilometers (186,000 miles) per second. The refractive index of a medium is calculated by dividing the speed of light in vacuum by the speed of light in that medium. The refractive index of vacuum is therefore 1, by definition. A typical single-mode fiber used for telecommunications has a cladding made of pure silica, with an index of 1.444 at 1500 nm, and a core of doped silica with an index around 1.4475.[65] The larger the index of refraction, the slower light travels in that medium. From this information, a simple rule of thumb is that a signal using optical fiber for communication will travel at around 200,000 kilometers per second. Thus a phone call carried by fiber between Sydney and New York, a 16,000-kilometer distance, means that there is a minimum delay of 80 milliseconds (about 1/12 of a second) between when one caller speaks and the other hears.[c]

          • foofiepie@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            2 days ago

            Makes sense. It’s actually quite cool. Our internet signals. Encoded in (I’m guessing) light waves instead of radio waves, with similar multiplexing/ways of maximising signal bandwidth?

            I’m staggered by how small these are and how flexible they are.

      • notfromhere@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        2 days ago

        LEO satellite comms coming online to route some of this traffic should be closer to c since will relay satellite to satellite to the last mile ground station to then reach the destination.

            • unexposedhazard@discuss.tchncs.de
              link
              fedilink
              arrow-up
              5
              ·
              edit-2
              2 days ago

              Thanks for the source :)

              Starlink’s LEO satellites will be in 1,110 to 1,325 km orbits. Although much lower than GEO, this is still too high to pro- vide lower latency than fiber over shorter distances. However, over longer distances the extra latency getting between Earth and the nearest satellite may be more than offset by routing around the world between the satellites at c.

              So yeah makes sense. The inital distance to space completely tanks the short distance latency, but eventually gets compensated by the higher transmissions speed when trying to cover longer distances. I havent found it yet, but what i really wanna know is the distance value at which sat overtakes fiber. I dont think this paper covers that sadly.

  • milicent_bystandr@lemm.ee
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    2 days ago

    Can you show different projections? Like one that keeps distances from you the same (countries will look very stretched at the far end but radial distances from you are preserved). It looks like the latency doesn’t quite follow physical distance from you, but it’s hard to tell because of the projection.

    (Interesting map though, thank you!)

    • kernelle@0d.gsOP
      link
      fedilink
      arrow-up
      9
      ·
      2 days ago

      Azimuthal Equidistant Projection shows the equal distances, probably my favorite

      Mercator Projection is good too

      • milicent_bystandr@lemm.ee
        link
        fedilink
        arrow-up
        4
        ·
        2 days ago

        Thanks!

        Is that Azimuthal projection centred on London though? It looks like it’s centred in Africa but maybe that’s just because the top-left is cropped off because it’s all ocean?

  • HubertManne@piefed.social
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 days ago

    Whats annoying is the US gave incentives to deploy fiber but it did not really happen the way it was supposed to. I believe canada had similar. east coast should be blasting down fiber to the west coast and they should be more orange in both cases.