09 Apr 2024

Inside Safaricom’s response to Kenya’s appetite for TikTok

In Kenya, TikTok is the third most accessed application on the internet after YouTube and Facebook.

Inside Safaricom’s response to Kenya’s appetite for TikTok

While it has long been known that TikTok has a huge following in Kenya, its reach and power were brought to the fore in both good and not-so-good ways at the funeral of Brian Chira, an influential TikToker, in late March.

While his family and friends had initially planned for 500 people, they were seemingly unaware of the following behind the 23-year-old orphaned man from Githunguri in Kiambu. The number of attendees was in excess of 5,000, and while they raised more than KSh8 million for his family, the funeral turned chaotic.

Are you on TikTok? About 10.6 million Kenyans aged 18 and above are, and that’s only the official number from Byte Dance, the company behind TikTok, as the app is also popular with teenagers.

With rapid growth since its establishment in 2017 by the Chinese tech firm, TikTok has become the universal app where you can find a watchman and a CEO dancing to the same tune.

The popular social media app hosts user-submitted videos that can range in length from three seconds to 10 minutes. It allows users to create, view and share videos recorded on mobile devices or webcams.

According to the Reuters Institute Digital News Report 2023 survey, Kenya leads the world in TikTok usage. The report indicates that Kenya has 54 per cent of global TikTok usage, with 29 per cent of TikTok activity in the country revolving around staying informed with news updates.

In Kenya, TikTok is the third most accessed application on the internet after YouTube and Facebook. It pushes an average of 1.91 Petabytes of data (One Petabyte is a million Gigabytes), which is approximately 15 billion Megabits of traffic, which is attributed to the application’s popularity among the Kenyan youth.

If this is converted to viewing hours, it is almost 6,000 hours of continuous viewing.

The longest TikTok video is 10 minutes, but most range between 30 seconds to three minutes. This translates to approximately 700,000 TikTok videos at the same time.

But do you know what it takes for the TikTok content to come to your phone? For the videos to load as fast as they do?

If you’re a regular TikTok user, you have noticed how fast the videos load. This is not by chance. Some work has gone behind it, and it began in 2022, when the network team at Safaricom noticed that TikTok was moving a lot of traffic.

To understand what was happening, it is important to understand how content is delivered to users over the internet in Kenya.

Content delivery

When you switch on your mobile data or connect to Wi-Fi, you’ll connect to one of the nearest base transmission stations, popularly known as masts or boosters.

As your traffic proceeds into Safaricom’s network, you will go through Safaricom’s systems and then on to the core network, where it will be directed to the server hosting the content you are looking for.

The different apps users’ access are developed in different countries. For instance, TikTok was developed in Singapore, while Facebook and X (formerly known as Twitter) were developed in the United States.

The result of this is that for users, their requests for a piece of content have to go to where the servers are located, which means that if there is a lot of traffic headed to a server, the longer it will take to get that content.

“In today’s world, you want to touch your phone, and you want that page to load as fast as your brain is moving. So, it’s very key that we reduce the loading speed even if it’s from 0.5 milliseconds to 0.05 milliseconds,” said Tima Ali, a core networks, planning and designing engineer at Safaricom.

Tima is a member of the team that sets up content delivery networks for platforms such as TikTok. The team’s mandate is to set up content delivery networks, essentially stacks of servers, to allow users to fetch content locally instead of from international links.

Fetching content from international links is not only expensive for Safaricom but comes with a bad experience for the users, as the content loads slowly.

Setting up the local content delivery networks involves setting up the servers and switches that will hold the content in Kenya.

This involves some networking and partnerships with different providers, then deploying the infrastructure (servers and switches) and integrating that with different networks to allow content to be fetched.

This translates to very high loading speeds on a user’s phone, rendering an extremely good customer experience.

This is what the team did when they noticed in 2022 that TikTok was moving a lot of traffic within their network.

Part of TikTok’s local traffic was carried by the Akamai Cache, a content delivery network which was already deployed within Safaricom.

In computing, a cache is hardware or software that temporarily stores something, usually data, in a computing environment. Once the infrastructure for a cache is done, a content provider like TikTok puts its content on it, and traffic is then directed towards it.

In Kenya, the demand for TikTok was so great that it drained the Akamai cache, making it unstable and forcing TikTok traffic on to international links. This made it expensive for Safaricom and bad for users, as TikTok videos would take longer to load.

“So, once we identified TikTok and the amount of traffic that they were pushing within our network, the next steps were to identify what we could do to ensure that we localised some of the traffic because what it also translates to is, if there is a lot of traffic being fetched internationally, then it uses up our bandwidth on international links,” Tima said.

After year-long conversations in 2022 between Safaricom and TikTok, there was agreement on the rules of engagement, and Tima and her team were able to proceed and deploy the caches within Safaricom’s data centers.

This has resulted in improved network recovery, as whenever Akamai goes down, traffic shifts to the local TikTok content delivery network instead of the international link.

“Our goal is to reduce the content loading speed to as low as possible and provide it to you in milliseconds or even microseconds if possible. We don’t want you to perceive time while you’re on an application,” said Tima.

Was this story insightful to you?

Accessibility Settings