Latency, Local Data Centres and Why Your App Feels Slow
Imagine ordering chai at a café in Nairobi, and the waiter walks to Mombasa to make it. He is very fast at making tea. He just has a long commute. That, in a nutshell, is latency, and it might be the reason your cloud app feels slow even though you are paying for a powerful server. Where that server lives, overseas or in one of the local data centres in Kenya, matters more than most people think.
What latency actually is
When you click a button in a web app, your device sends a request to a server, the server does some work and sends a response back. The time that request spends travelling there and back is called latency. It is usually measured in milliseconds, which sounds tiny, but it adds up fast.
Here is the catch: one page or one action often involves many trips. The app might fetch the page, then the styles, then some data, then a bit more data, then an image. If each trip has to travel to a data centre on another continent and back, the delays stack up. Users do not see the milliseconds. They just feel that the app is sluggish.
Distance is not the only factor
Data travels through undersea cables and land networks, and the further it goes, the longer it takes. But distance is only part of the story. Other things that slow down the journey include:
The route your internet provider takes, which is not always the most direct one
Congested networks during busy hours
Weak mobile signal or overloaded Wi-Fi in the office
An app that makes far more requests than it needs to
A slow database or server doing too much work per request
This is why two apps hosted in the same place can feel very different. A well-built app makes fewer, smarter trips. A poorly built one sends the waiter to Mombasa for every sugar cube.
Why local data centres in Kenya matter
For a long time, many Kenyan businesses hosted their apps on servers in Europe, the United States or elsewhere, simply because that was where the major providers were. Today there are more options, including data centres in Kenya and elsewhere on the continent. Hosting closer to your users generally means shorter trips and a snappier experience.
There can also be other reasons to keep data closer to home. Some organisations prefer or are required to know exactly where their data is stored, especially when it involves personal information covered by the Data Protection Act. If that applies to you, it is worth getting specific advice rather than guessing.
That said, local is not automatically better. Compare reliability, support, backup options and price, not just location. A nearby data centre with frequent outages is not a bargain.
Tricks that make apps feel faster
You cannot always move your servers, but you can usually reduce how much latency hurts. Some common techniques:
Use a content delivery network, which keeps copies of images and files in locations closer to users
Cache data that does not change often, so the app does not keep asking for it
Combine many small requests into fewer larger ones
Compress images and files so less data needs to travel
Show something useful on screen immediately while the rest loads
How to tell if latency is your problem
If your app is slow, ask your developer or hosting provider a few direct questions. Where are the servers? How long does a typical request take from Kenya? How many requests does the main screen make? Is the slowness the same all day, or worse at certain times?
Chebet, who manages a chain of pharmacies, discovered her stock app was hosted overseas and made dozens of requests to load one screen. Her developer added caching, trimmed the requests and moved the database closer. Nothing else changed, yet staff were convinced they had been given a brand new system.
Speed is a feeling, and in business, feelings matter. A fast app gets used properly. A slow one gets abandoned for the old notebook, and then you are back to sending the waiter to Mombasa.
A practical next step: open your main business app on your phone, time how long the first screen takes to load, and send that number to whoever built it. Whether it came off the shelf or from a custom software development project, ask them where it is hosted while you are at it.