A community for technology geeks in Lebanon.

You are not logged in.

#1 April 1 2019


Low Latnecy Web Hosting

Hi all,

A friend is working on a ecommerce web app based on PHP. He would like to offer a snappy smooth experience for his customers.

An issue he wants to tackle is finding a hosting server that offers low latency and good bandwidth. He'll take care of the site app optimization and whatnot; but needs to make sure there is no performance bottle necks from the server side.

Can you recommend a hosting company based on your experience? Is local ISP hosting recommended (latency should be great, but not sure they can handle good and stable upload speeds). Maybe some place in europe (UK?) where he can sacrifice a bit on latency but get proper upload bandwidth?



#2 April 1 2019


Re: Low Latnecy Web Hosting

It all depends on his use case and on the budget he's willing to allocate for his performance.

He likely doesn't need to worry about this

: It's unlikely that an ecommerce shop requires crazy low latency from a server. Most users won't be turned off by a shopping cart who takes 0.5s longer to display. Just pick any regular host. If you need recommendations:

  • DigitalOcean has cheap options

  • AWS is more expensive, but offers much MUCH more options

These hosting companies will offer several options to improve your latency and bandwidth, and will generally offer multiple geographical locations depending on your audience.

He still wants crazy low latency

I don't have time to go too much into it right now, but tell him to check out Edge Computing. It's new, it's hype, it's a buzzword, it's constantly changing, it's still super expensive, but it's probably what he's looking for.


#3 April 1 2019


Re: Low Latnecy Web Hosting

I have a Vultr account which lets you spawn VPS instances in different countries.

I have deduced that the fastest latency would be for a VPS based in France, Lebanon seems to have an underwater connection that goes directly to France.

You can test - ping to and from their servers on this page:

I am assuming you are interested mostly in experience for Lebanese users
There is an important geographical component to latency. If you want something global, it becomes more complicated.

There are the solutions that Joe mentioned, and there is one thing I can suggest: Cloudflare. Basically if you want something which works all across the world and don't want to bother with the technicality, you can use a CDN which should automatically distribute content for you.

.5 seconds might not make a big difference for someone who wants to buy, however I like snappy sites, I think it improves the experience, improves the image, and is better for the environment (less waste of computing power hence electricity).

A European DSL connection might deal well with a heavy site, but in Lebanon, a lean and fast site is more than a luxury. A bloated heavy site will take ages to load. But anyway it is getting better now.

There are many things you can do to make the site faster. First of all, write lightweight code, do not bundle anything unnecessary, carefully optimize photo sizes. Use build tools to minify your CSS, bundle your Javascript.

Make sure that caching is set up properly, and gzip compression is set up on the server.

I even experimented with doing Ajax tricks to get only the data that has changed. It was blazing fast. However it introduced additional complexity, SEO issues (in the past anyway - now it should be OK) and made it much harder to maintain the whole thing.

You could do something similar based on Websock, that would be even faster.

And finally use a fast platform - PHP7 on a decent VPS in Europe, or something more sophisticated (edge computing or whatever), not some crappy hosting platform in USA which is the other end of the planet.

As an example, check this site, which I coded myself, and hosted on a Vultr VPS based in London. It is optimized, but does not do anything crazy, it just loads the data through Ajax which makes it faster to browse the book catalog.

Also I used a pluggable cart (Snipcart) because I did not want to code it myself from scratch, and that part is one of the heaviest resources that the site loads (I think it is 1MB) but it loads in parallel so it would affect the experience minimally, most of the time.

There is also a "live search" function which adds to the whole experience.

Check it out:


Last edited by rolf (April 1 2019)


Board footer