Saturday, January 29, 2011

Server in country X. Majority of users from country Y. Load times are unacceptable.

I've been asked to explore our options.
They don't wish to move the server physically because it's a lot of work and there will be no one to take care of things if something really bad happens. Optimizing the website itself probably won't do much good because both response time and transfer speed are slow and a lot of content has to be transferred.
They are talking about setting up a cheap second server(a VPS?) in county Y or somewhere in between, but I am not sure what to do with it. So what are the options, really ?

  • As both a latency and data transfer rate problem, you'd have to both move the service closer to the end user and get a faster pipe. A VPS closer to the country Y users with sufficient data speed is a good start. Specifically which country is country Y? (Finding a service provider closest to users)

    From wayoutmind
  • Your best option, by orders of magnitude, is to move the entire service to a location topologically closer to your userbase. Sure, moving the current physical hardware to a new location isn't such a win, but you can use a managed service provider where you lease the server hardware (or use a VPS) and then if the hardware breaks, it's the provider's problem, and if the software breaks, it's your problem (but you can get into the machine to fix it remotely). You can then use the current hardware for a different purpose (say, a staging server).

    If, for some reason, you absolutely must host the site itself on the current physical hardware in the current network location, you need to setup a caching proxy closer to your users. This is a dog of an option, which will increase the latency and performance problems for data that has to be transferred from the site each time, but can do wonders for the perceived performance for static assets that can be cached close to the users (images, javascript, static HTML). If your site is primarily static, this can be a good option, but if it's a largely dynamic site where users are constantly making requests that have to be responded to via dynamically-generated HTML from the origin server, it's not going to help.

    wayoutmind : We could go on and on about web service optimization, but yes, good suggestion about using a caching proxy. Another point for consideration: Using a CDN for static assets (Google AJAX Libraries API, CloudFront, Akamai, etc)
    womble : Yeah, I'm assuming that there isn't budget for a "proper" CDN or other heavyweight optimisation work, based on the "vibe" of the question. If there's resistance to the idea of just putting the service close to the users (the obvious answer), plunking down for Akamai isn't likely to to be on the cards.
    wayoutmind : Agreed, just throwing it out there +1
    From womble
  • So you get a new server in a distante land. So how are you going to sync both servers? How are you laying out DNS? Two different hostnames? Is you application ready for a multiple server setup.

    I mean getting a crappy link closer to the users is not going to perform miracles.

    I mean I access servers in other countries a lot and if it is not pulling at 8Mbps or more then I am getting shaped somewhere. Latency is usually below 100ms.

    My point is I am sure you can host your site from one country to the other side of the globe with a good connection even without cached static content. Get you server hosted in a good ISP and you will be connected to the backbone, the other side of the world is less then 10 hops away.

    Without more details on the type of application optimization tips can only be generic, because they depend on tecnology and architecture.

    From krugger

0 comments:

Post a Comment