Online Content Delivery to Nepal

When working on my various projects, I have had a number of challenges connecting to the outside world. The international connections from Nepal to India, Hong Kong, Thailand and Singapore have seemingly gone down for a period of time. It’s a peculiar situation when this happens because our users are able to access government websites hosted in Nepal and Google cached items including YouTube videos.

We faced a few challenges this week when trying to submit data to cloud servers in Singapore or India causing me to research how internet traffic moves through the region.

Content Delivery Network
I had never heard the term content delivery network until I moved here because so many services are available in the US. We take major infrastructure such as Amazon Web Services for granted. These major companies have thousands of servers all over the country allowing content to be delivered fast. For example, Netflix uses AWS to deliver streaming videos all over the country.

A content delivery network is a group of servers stationed all over the world that duplicate static content so it can be served more quickly to hard to reach areas. Static content includes html files, images, stylesheets and videos. Simply put, it’s anything that can be stored and isn’t actively changing. Static content does not include things stored in a database. Amazon’s CDN is called CloudFront. Another major player is Boston based Akamai. As an aside, more information than you can handle about CDN is available at Amazon’s global infrastructure can be found here. Take a look at the Asia Pacific region and you’ll see that our options for Nepal include Edge spots in India, Singapore and Hong Kong. The closest hops are at these locations.

Getting Out of Nepal
The history of Nepal Telecom (NTC) is available on their website. In summary, they were established as a government corporation who had a monopoly on providing telecommunication services to the country including landline, internet and mobile phone service. They converted to a corporation on April 13th 2004, opening the market up to competition but seem to remain the major player in international internet connectivity. I don’t have much proof, but traceroutes from a number of locations and internet service providers all route through NTC.

Unfortunately, I couldn’t find any more detail on international connectivity from Nepal. However, I found a bit about speed. The Q1 2014 Akamai state of the internet quarterly report states that average connectivity from Nepal to their network is 1.1 MBPS and average peak connectivity speed is 0.96 MBPS. 1

Choosing A Server
Now, to bring everything together. These have been valuable lessons when trying to identify a host for our information. There is a seemingly large number of service cloud providers around the world with cheap services and access just outside the country. However, hosting mission critical information in these platforms will cause failure if the international links go down. We did a survey of in country hosting services for a recent pilot project and the cost was prohibitively expensive. However, we will likely shift from a cloud provider to a local provider when the pilot shifts into future phases and the businesses begin to rely on these systems.

One more thing to note. Make sure to choose a location as close as possible to your geographically. For example, choose the Singapore servers if you’re hosting on Digital Ocean.

Structuring Your Content
If you’re building products for delivery over a CDN, try to build as much static content as possible. This blog uses Jekyll which converts all of my posts from Markdown to static HTML websites. This is perfect for delivery over the CDN because there are no database calls and all of these pages are stored at the edge servers. Emerging technologies like Meteor, which require a lot of communcation between client and server will be challenging in this environment. If you can’t do it with static pages, use languages like Ajax or Javascript to only refresh parts of pages which require active content.

Contact me if you'd like to talk about this post.