What's new

Why is so much Internet traffic leaving Pakistan?

truthfollower

BANNED
Joined
Mar 8, 2019
Messages
1,841
Reaction score
-4
Country
Pakistan
Location
Pakistan
Need to host content locally
https://blog.apnic.net/2020/03/10/why-is-so-much-internet-traffic-leaving-pakistan/
Aftab Siddiqui is a Technical Engagement Manager for the Internet Society.
At the recent SANOG meeting held in my homeland, Pakistan, I wanted to provide the local community with some insight into the importance of Internet Exchanges (IXs), specifically the need to host content locally.

Knowing that data is king among network operators, I set up a virtual machine as soon as I arrived to collect information on several key metrics, including latency and the hosting location of .pk domains. Needless to say, the results were surprising.

How long does it take to connect to public DNS services?
First, I tested for latency, specifically the time it takes to PING three of the most popular public DNS services: Cloudflare DNS (1.1.1.1), Google Public DNS (8.8.8.8), and Quad9 (9.9.9.9). (PING is not the best way to test DNS but this is for reachability purpose only.)

Before leaving my home in Sydney, Australia, I did the same to offer a comparison. As you can see from the results below (Figure 1), all were below 1ms.


Figure 1 — Latency measurements to connect to public DNS services in Sydney, Australia.
The results for Pakistan were less consistent.

Cloudflare was the best of the bunch with an average of 3ms, thanks largely to the three data centres they opened in Karachi, Lahore and Islamabad late-2018.

traceroute to 1.1.1.1 (1.1.1.1), 64 hops max, 52 byte packets
1 110.18.48.1 (10.18.48.1) 5.901 ms 2.933 ms 3.664 ms
2 2202.163.100.105 (202.163.100.105) 5.297 ms 5.205 ms 7.234 ms
3 * * *
4 202.163.100.66 (202.163.100.66) 6.572 ms 4.340 ms 4.051 ms
5 119.159.240.53 (119.159.240.53) 3.728 ms 3.403 ms 3.399 ms
6 khi77.pie.net.pk (221.120.251.205) 9.160 ms
khi275.p01.pie.net.pk (221.120.251.201) 5.765 ms 7.170 ms
7 rwp44.pie.net.pk (221.120.251.101) 5.268 ms 4.654 ms
rwp44.pie.net.pk (221.120.251.88) 4.956 ms
8 static.khi77.pie.net.pk (221.120.200.3) 5.270 ms 5.438 ms 5.009 ms
9 one.one.one.one(1.1.1.1) 3.722 ms 3.915 ms 3.467 ms
Google was second and even though it has several caches hosted in Pakistan, its latency hovered around 25ms.

traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
1 10.18.48.1 (10.18.48.1) 7.683 ms3.913 ms 4.363 ms
2 202.163.100.105 (202.163.100.105) 4.654 ms 5.716 ms 6.581 ms
3 * * *
4 202.163.100.66 (202.163.100.66) 7.731 ms 5.862 ms 4.388 ms
5 119.159.240.53 (119.159.240.53) 5.593 ms 7.199 ms 7.226 ms
6 10.253.4.26 (10.253.4.26) 8.717 ms
10.253.4.8 (10.253.4.8) 6.228 ms
10.253.4.26 (10.253.4.26) 5.140 ms
7 74.125.118.170 (74.125.118.170) 25.506 ms 23.927 ms 22.310 ms
8 * * *
9 dns.google(8.8.8.8) 25.356 ms 24.182 ms 24.443 ms
Quad9, which has no local POPs, came in at a very slow 203ms.

traceroute to 9.9.9.9 (9.9.9.9), 64 hops max, 52 byte packets
1 10.18.48.1 (10.18.48.1) 2.921 ms 5.942 ms 3.498 ms
2 202.163.100.105 (202.163.100.105) 5.388 ms 5.041 ms 4.442 ms
3 202.163.100.25 (202.163.100.25) 5.492 ms
202.163.100.121 (202.163.100.121) 5.179 ms 5.183 ms
4 202.163.100.66 (202.163.100.66) 3.842 ms 4.455 ms 2.862 ms
5 119.159.240.53 (119.159.240.53) 4.525 ms 4.177 ms 4.179 ms
6 10.253.4.133 (10.253.4.133) 6.869 ms 4.925 ms 6.503 ms
7 et7-1-5.catania8.cat.seabone.net (93.186.129.38) 104.627 ms 104.593 ms 104.202 ms
8 ae24.franco31.fra.seabone.net (195.22.211.50) 199.860 ms 134.881 ms 137.868 ms
9 de-cix.woodynet.net (80.81.194.42) 249.100 ms 205.069 ms 204.172 ms
10 dns9.quad9.net (9.9.9.9) 203.927 ms !Z 201.411 ms !Z 204.876 ms!Z
What this experiment shows is the importance of hosting services locally. We could expect to see a further reduction in latency if such services were also hosted at a local IX, as it would reduce the number of hops for those that peer with it to one; the benefits of which would be reduced transit costs, with the savings being handed down to customers.

Currently, Pakistan has one IX, PKIX, which has two exchange points — one in Islamabad and one in Karachi — with 17 Members peering with it.

Where are ‘local’ websites hosted?
As we’ve seen so far, the best way to reduce latency for DNS services is make them local, so packets don’t have to travel extreme distances. The same can be said for web content too, whereby websites hosted locally should, in theory, be faster to connect to than those hosted internationally.

So, for my second experiment, I looked at where websites with .pk country code top-level domains (ccTLDs) were being hosted.

The time of my test was short so I could only get public data, which was around 15,000 .pk domains. However, like the latency test, it provided a very clear picture of the current situation.

Of the 14,927 .pk domains, only 1,541 are being hosted by ISPs or entities registered in Pakistan, and another 1,300 are being hosted by Cloudflare. That’s less than 20% of sites that, you would think, would be targeting local users. Instead, more than 80% of ‘local content’ is being hosted in servers outside of Pakistan, and, as such, is subject to international transit costs and increased latency.


Figure 2 — DNS records for .pk domains.
Digging deeper, I also looked it up for gov.pk, who you would think are targeting the people in Pakistan, right? Out of 431 gov.pk domains I found in the 15,000 domain addresses, only 72 were registered or advertised by Pakistani entities, 28 are with Cloudflare, and the remaining 331 are outside of Pakistan.


Figure 3 — DNS records for gov.pk domains.
Needless to say, I was quite surprised that so many local council websites are hosted outside of Pakistan, most likely because they were cheap.

Finally, I looked at edu.pk. For a university to host something outside of Pakistan and not within the university is blasphemy for me. Unfortunately, this is the case for the majority of edu.pk sites with fewer than 20% hosted locally.


Figure 4 — DNS records for edu.pk domains.
How many websites have Quad A records?
The IPv6 Task Force was established in Pakistan around 2006/07 during which time it built a test network between several ISPs. Unfortunately, IPv6 never caught the limelight beyond testing and enabling in core networks, and capability remains less than 1%.

I was hoping that because many websites are hosted outside Pakistan, that content might have been accessible via IPv6. Unfortunately, this wasn’t the case either, with the exception of Cloudflare.


Figure 5 — AAAA records for .pk domains.
One thing that’s not clear from Figure 5 is that of the 1,304 websites hosted by Cloudflare, why were only 1,087 responding to AAAA requests? Have some turned off IPv6? If so, why? I plan on digging deeper into this using the virtual machine generously provided by Rapid Compute (a cloud services provider in Pakistan).

Finally, it’s worth pointing out that all of the above would be a lot worse if it weren’t for Cloudflare setting up its Content Delivery Networks (CDNs) in Pakistan in 2018. However, if more CDNs are set up in Pakistan, there needs to be more local content available for them to host. This surely cannot be too difficult for an economy with more than 200 million people.

Aftab Siddiqui is a Technical Engagement Manager for the Internet Society.
 
Last edited:
. .
haha.. i woul like to know where defence.Azad Kashmir is being hosted\\\


good explanation.. this explains why some of .pk sites are slow when browsing from europe
 
.
Datacenters in Pakistan which have hosting capabilites are mostly affected by outages (internet/electricity) one day or the other slowing everything down. Can't have mission critical stuff lying around there.
We have many EC2 instances running and other hosting in NAM / Europe without any issues.
 
.
I use godaddy for my business website/email hosting and same used by others in my network.

Used to use a local service before. Reason to shift is ease of business, better service and better packages. Also a fear that locals are known to snatch up your domain names and then blackmail you once expired. Godaddy auto renews via my stored billing details.

However for cloud storage and some other services we are using in house raspberry pi based servers. Extremely low power so easy to give extended backup in case of outages. Reliable fiber optic connectivity is now becoming the standard so hope businesses will more and more shift to own hosting if they have the technical staff to manage it.
 
Last edited:
.
Need to host content locally
https://blog.apnic.net/2020/03/10/why-is-so-much-internet-traffic-leaving-pakistan/
Aftab Siddiqui is a Technical Engagement Manager for the Internet Society.
At the recent SANOG meeting held in my homeland, Pakistan, I wanted to provide the local community with some insight into the importance of Internet Exchanges (IXs), specifically the need to host content locally.

Knowing that data is king among network operators, I set up a virtual machine as soon as I arrived to collect information on several key metrics, including latency and the hosting location of .pk domains. Needless to say, the results were surprising.

How long does it take to connect to public DNS services?
First, I tested for latency, specifically the time it takes to PING three of the most popular public DNS services: Cloudflare DNS (1.1.1.1), Google Public DNS (8.8.8.8), and Quad9 (9.9.9.9). (PING is not the best way to test DNS but this is for reachability purpose only.)

Before leaving my home in Sydney, Australia, I did the same to offer a comparison. As you can see from the results below (Figure 1), all were below 1ms.


Figure 1 — Latency measurements to connect to public DNS services in Sydney, Australia.
The results for Pakistan were less consistent.

Cloudflare was the best of the bunch with an average of 3ms, thanks largely to the three data centres they opened in Karachi, Lahore and Islamabad late-2018.

traceroute to 1.1.1.1 (1.1.1.1), 64 hops max, 52 byte packets
1 110.18.48.1 (10.18.48.1) 5.901 ms 2.933 ms 3.664 ms
2 2202.163.100.105 (202.163.100.105) 5.297 ms 5.205 ms 7.234 ms
3 * * *
4 202.163.100.66 (202.163.100.66) 6.572 ms 4.340 ms 4.051 ms
5 119.159.240.53 (119.159.240.53) 3.728 ms 3.403 ms 3.399 ms
6 khi77.pie.net.pk (221.120.251.205) 9.160 ms
khi275.p01.pie.net.pk (221.120.251.201) 5.765 ms 7.170 ms
7 rwp44.pie.net.pk (221.120.251.101) 5.268 ms 4.654 ms
rwp44.pie.net.pk (221.120.251.88) 4.956 ms
8 static.khi77.pie.net.pk (221.120.200.3) 5.270 ms 5.438 ms 5.009 ms
9 one.one.one.one(1.1.1.1) 3.722 ms 3.915 ms 3.467 ms
Google was second and even though it has several caches hosted in Pakistan, its latency hovered around 25ms.

traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
1 10.18.48.1 (10.18.48.1) 7.683 ms3.913 ms 4.363 ms
2 202.163.100.105 (202.163.100.105) 4.654 ms 5.716 ms 6.581 ms
3 * * *
4 202.163.100.66 (202.163.100.66) 7.731 ms 5.862 ms 4.388 ms
5 119.159.240.53 (119.159.240.53) 5.593 ms 7.199 ms 7.226 ms
6 10.253.4.26 (10.253.4.26) 8.717 ms
10.253.4.8 (10.253.4.8) 6.228 ms
10.253.4.26 (10.253.4.26) 5.140 ms
7 74.125.118.170 (74.125.118.170) 25.506 ms 23.927 ms 22.310 ms
8 * * *
9 dns.google(8.8.8.8) 25.356 ms 24.182 ms 24.443 ms
Quad9, which has no local POPs, came in at a very slow 203ms.

traceroute to 9.9.9.9 (9.9.9.9), 64 hops max, 52 byte packets
1 10.18.48.1 (10.18.48.1) 2.921 ms 5.942 ms 3.498 ms
2 202.163.100.105 (202.163.100.105) 5.388 ms 5.041 ms 4.442 ms
3 202.163.100.25 (202.163.100.25) 5.492 ms
202.163.100.121 (202.163.100.121) 5.179 ms 5.183 ms
4 202.163.100.66 (202.163.100.66) 3.842 ms 4.455 ms 2.862 ms
5 119.159.240.53 (119.159.240.53) 4.525 ms 4.177 ms 4.179 ms
6 10.253.4.133 (10.253.4.133) 6.869 ms 4.925 ms 6.503 ms
7 et7-1-5.catania8.cat.seabone.net (93.186.129.38) 104.627 ms 104.593 ms 104.202 ms
8 ae24.franco31.fra.seabone.net (195.22.211.50) 199.860 ms 134.881 ms 137.868 ms
9 de-cix.woodynet.net (80.81.194.42) 249.100 ms 205.069 ms 204.172 ms
10 dns9.quad9.net (9.9.9.9) 203.927 ms !Z 201.411 ms !Z 204.876 ms!Z
What this experiment shows is the importance of hosting services locally. We could expect to see a further reduction in latency if such services were also hosted at a local IX, as it would reduce the number of hops for those that peer with it to one; the benefits of which would be reduced transit costs, with the savings being handed down to customers.

Currently, Pakistan has one IX, PKIX, which has two exchange points — one in Islamabad and one in Karachi — with 17 Members peering with it.

Where are ‘local’ websites hosted?
As we’ve seen so far, the best way to reduce latency for DNS services is make them local, so packets don’t have to travel extreme distances. The same can be said for web content too, whereby websites hosted locally should, in theory, be faster to connect to than those hosted internationally.

So, for my second experiment, I looked at where websites with .pk country code top-level domains (ccTLDs) were being hosted.

The time of my test was short so I could only get public data, which was around 15,000 .pk domains. However, like the latency test, it provided a very clear picture of the current situation.

Of the 14,927 .pk domains, only 1,541 are being hosted by ISPs or entities registered in Pakistan, and another 1,300 are being hosted by Cloudflare. That’s less than 20% of sites that, you would think, would be targeting local users. Instead, more than 80% of ‘local content’ is being hosted in servers outside of Pakistan, and, as such, is subject to international transit costs and increased latency.


Figure 2 — DNS records for .pk domains.
Digging deeper, I also looked it up for gov.pk, who you would think are targeting the people in Pakistan, right? Out of 431 gov.pk domains I found in the 15,000 domain addresses, only 72 were registered or advertised by Pakistani entities, 28 are with Cloudflare, and the remaining 331 are outside of Pakistan.


Figure 3 — DNS records for gov.pk domains.
Needless to say, I was quite surprised that so many local council websites are hosted outside of Pakistan, most likely because they were cheap.

Finally, I looked at edu.pk. For a university to host something outside of Pakistan and not within the university is blasphemy for me. Unfortunately, this is the case for the majority of edu.pk sites with fewer than 20% hosted locally.


Figure 4 — DNS records for edu.pk domains.
How many websites have Quad A records?
The IPv6 Task Force was established in Pakistan around 2006/07 during which time it built a test network between several ISPs. Unfortunately, IPv6 never caught the limelight beyond testing and enabling in core networks, and capability remains less than 1%.

I was hoping that because many websites are hosted outside Pakistan, that content might have been accessible via IPv6. Unfortunately, this wasn’t the case either, with the exception of Cloudflare.


Figure 5 — AAAA records for .pk domains.
One thing that’s not clear from Figure 5 is that of the 1,304 websites hosted by Cloudflare, why were only 1,087 responding to AAAA requests? Have some turned off IPv6? If so, why? I plan on digging deeper into this using the virtual machine generously provided by Rapid Compute (a cloud services provider in Pakistan).

Finally, it’s worth pointing out that all of the above would be a lot worse if it weren’t for Cloudflare setting up its Content Delivery Networks (CDNs) in Pakistan in 2018. However, if more CDNs are set up in Pakistan, there needs to be more local content available for them to host. This surely cannot be too difficult for an economy with more than 200 million people.

Aftab Siddiqui is a Technical Engagement Manager for the Internet Society.

A clear sign of cyber security threat when 80% of your country websites including the government ones are hosted on servers outside of Pakistan. At least the government websites should be 100% hosted on servers located within Pakistan and in control of Pakistani State. There is a lot of room for government and private investment in website hosting and building data centers within Pakistan.
 
.
I use godaddy for my business website/email hosting and same used by others in my network.

Used to use a local service before. Reason to shift is ease of business, better service and better packages. Also a fear that locals are known to snatch up your domain names and then blackmail you once expired. Godaddy auto renews via my stored billing details.

However for cloud storage and some other services we are using in house raspberry pi based servers. Extremely low power so easy to give extended backup in case of outages. Reliable fiber optic connectivity is now becoming the standard so hope businesses will more and more shift to own hosting if they have the technical staff to manage it.

local services not trustworthy? Fiber is only available in I think Lahore Islamabad Karachi? But after every few months connectivity issue because of damage to sea cable in Pakistan.
 
.
local services not trustworthy? Fiber is only available in I think Lahore Islamabad Karachi? But after every few months connectivity issue because of damage to sea cable in Pakistan.
Been using Fiber optic internet at home and office for the last 6 years, I dont have any complaints. When there is underwater sea cable issue these companies have alternate cables and VSAT links, sure slows down a bit but still gets the work done. Only time I had down times was when KE-Electric was doing cleaning up on unwanted cables on it's poles and even in that case I managed connectivity via a 4G hotspot. Been using both Optix and Transworld. Would recommend Transworld as they have their own international backbone, Optix buys from Singtel.

In terms of internet connectivity Pakistan has greatly improved in the last 2 years and I hope we will make really good progress now on with regards to IT matters.
 
.
Host content locally as much as possible.

Pakistanis can earn millions by hosting all content locally.
 
.
Been using Fiber optic internet at home and office for the last 6 years, I dont have any complaints. When there is underwater sea cable issue these companies have alternate cables and VSAT links, sure slows down a bit but still gets the work done. Only time I had down times was when KE-Electric was doing cleaning up on unwanted cables on it's poles and even in that case I managed connectivity via a 4G hotspot. Been using both Optix and Transworld. Would recommend Transworld as they have their own international backbone, Optix buys from Singtel.

In terms of internet connectivity Pakistan has greatly improved in the last 2 years and I hope we will make really good progress now on with regards to IT matters.

Some years ago we were going to refinance (take on debt from another bank) the consortium debt of transworld but our bosses did not agree as they wanted to wait for a year (even though the company has good prospects and is part of a well known business group).

I found out that it does not take that much to become part of a sea cable consortium. If a company has 10 Mill USD lying around then it can get the rest financed in 70-30 or 75-25 ratio to set up one. The problem then arises of distributing it on retail basis which transworld caters to through own setup apart from selling bandwidth wholesale to internet companies/ mobile network operators e.t.c

However, nowadays too many companies are in this cable business which results in hindrance for new entrants.
 
.

Country Latest Posts

Back
Top Bottom