News

Internet Connectivity In Ghana – Best On Paper, Worst In Reality?

 

Internet speed in Ghana, work in progress

I am one of the many individuals around who depend so much on the internet. Many of us do, not only for getting in touch with friends or sharing posts, but also to work. As I write these words, I am on a break, somewhere 11 am in the morning. Before my break, I was working on getting three instances running side-by-side in my Virtual Private Server, with lots of bummers along the line. Then the break came in!

My break is not the intentional type, the one workers take for lunch and to stretch in the afternoon. Mine is unusual. A unique one. Yes, I took my break, thanks to internet connection.

Before I begin below with more ranting (In fact, how I fix my slow internet speed, and is the internet really slow?), lemme give you a quick overview of what it means to be on slow internet connection, if not fully ‘unconnected’.

Internet Elsewhere

I was in the Koninklije den Netherlands for the weekend beginning April 9th. Among many other tasks I had on hand, such as going to have a look for myself awesome gadgets at MediaMakt, I also planned running a simple benchmark to determine how fast my home (Koforidua, Ghana) internet connection stood in comparison to that in the Netherlands, precisely, Den Haag.

What was the benchmark?

Syncing my Android source code with the upstream version was the benchmark. I build CyanogenMod 12.1 (5.x) for my phone periodically, thus I wouldn’t have to download the updates from CyanogenMod download website.

The results were shocking, with a huge difference in the time it takes to sync with internet at home in Ghana, and what it was at my conference area and or hotel.

Well, to get into the digits, it takes (yes, still takes today) about 120 to 240 seconds (2 to 4 minutes) to update my local repository using internet connection on the fastest network I’ve used so far in Ghana.

This network I talk of is 3G speed, with actual values hitting me around 8MBs maximum. Yet it takes some 4 minutes max to update my local repository. In fact, that speed is NOT when I update the repo during the day. The 4 minutes max is somewhere around 12 midnight to early morning, perhaps 4 am?. During the day, multiply the 4 minutes by ‘n’, where ‘n’ is any number not less than 4.

On the other hand, how long did it take in the Netherlands?

It took less than 15 seconds. I repeat, less than 15 seconds. I tried not twice or thrice, but multiple times in an attempt to determine whether it wasn’t a bug. And this was during the day, somewhere 12 noon, a time known in Ghana as ‘peak hours’.

The updates aren’t huge which should take long. Usually, the updates are just about 50-100 MB in size, scattered across different repositories, and that’s even when one doesn’t update for maybe a week or more. Sometimes the update size is less than 20 MB. It varies.

Comparing the time taken to update my local repository in Ghana and in the Netherlands, its clear which internet is better. In fact, I didn’t notice the ‘loading.gif’ icon anywhere in any applications I used on my Android phone when I was in Den Haag. I press play on YouTube, and the video begins playing, as if its already on my phone. I visit a webpage, and it takes not more than 5 seconds and the site is usable.

So, the question is, What makes internet connection in Ghana that slow? Where’s the problem coming from? Aren’t the network providers in Ghana using same industry standard technological telecoms systems?

Isn’t 3G in Ghana the same as 3G in the US or Japan? What makes their internet relatively faster than ours if we all have the same systems?

These questions might take you the next light years to answer perhaps, but the simplest workaround is what I am about to explain to you, which is no holy grail, but a sure way to help you get the best from your internet. Rest assured too that, internet in Ghana is not necessarily slow, but the culprit to our slow internet connection lies somewhere else.

DNS is the culprit

Domain Name Server resolution, I have come to realize, is the biggest culprit and the downfall to our internet speeds in Ghana. Why all of a sudden blaming DNS? The truth is, our internet connections are fast, when the user is directly connecting to whatever server to, say Google.com.

However, before such a connection takes place, what is called DNS resolution happens.

If you enter a domain name like google.com, the name needs to be resolved which involves converting the domain name you enter into IP address, so as for your browser to connect to the respective server. Servers don’t speak English, they speak cluster of numbers separated by ‘.’s (dots) known as IP address.

With the little explanation of what really happens, know that, without a resolved domain name, you are not connecting to anything. Without DNS, you cannot connect to any website when you enter the domain name. To visit any website of your choice, you would have to explicitly input the site’s IP address into your browser. In that case, the browser directly connects to wherever that domain name is, avoiding the conversion of domain names to IP addresses part.

Let’s Do This

Likely, there are websites you visit frequently, but anytime, because their domain names have to be resolved into IPs, the process steals precious time of yours. You wondering, ‘Is there no way to hardcode these IP addresses somewhere so that your computer/browser wouldn’t have to resoIve them every now and then?

In Linux, you can. It is quick and an easy fix. I assume you are on Linux (Ubuntu) to do this. I have no idea how it is do this in Windows (haven’t bothered learning though, those who know my OS background would understand).

Steps (A short how-to video is found below based on these steps)

Open up your terminal. Ctrl + Alt + T
Type sudo nano /etc/hosts
You should see IP addresses with next to them domain names.
Open a new tab in your terminal. Ctrl + Shift + T
Type in, say host github.com
The IP address of the domain name will be revealed
Go back to initial tab of terminal with the hosts file opened
Add in the IP address of the domain, here github, and add the domain name alongside. Follow the outline in the file.
Save the file
Done
Conclusion

I have found this approach to always work in my case. The culprit, I consider to be the DNS supposed to be handling requests from our country. Those servers are either lazy and do not do a good job in quick responses, or they are few in number thus having congested traffic. Whatever be the case, that’s none of my business.

My business is, connect to the server directly. Although this happens to work, it does not necessarily mean every single website you ever visit, or wish to visit, you have to add the IP address in the /etc/hosts file. Only do so for websites you frequently visit, such as in my case, github, and android

I hope this helps you too. If you are on Windows, please do google online to learn how to do same. I am sure it will be pretty easy to do similar.

By Rexford Nkansah; in house technology geek

Related Articles

Back to top button

Adblock Detected

Kindly support TheAfricanDream LLC by disabling your Adblocker. Thank you.