views:

22

answers:

2

I'm not exactly sure what I'm looking for but basically I have a PHP app that customers use on their own server.

In it it does a 'call home' command to check if the license key they are using is valid before allowing them to use it.

I currently make it connect to my primary server which is very fast, but it is hosted in the US and if clients have a website hosted in Australia or the UK it can be up to a 500ms wait for the call home script to connect. I need to reduce this time as much as possible.

What I'm looking for is some company that has servers all over the world that would mirror this call home script (and keep the databases in sync as it the system needs to log connects from clients) so that no matter where a clients server is located the call home script would be able to connect fast.

Is this possible? If so how could I go about doing this, what am I looking for here?

A: 

You can get VPS servers from Linode in both the US and the UK. You could run your script on both servers. As for synchronizing the database, you could use something like an SSH tunnel and take advantage of MySQL database replication.

Basically, it sounds like you're trying to reduce latency, and the only way to do that is to launch some kind of server instance in the US. Regardless of the implementation, you're still going to need some kind of server. Managed hosting could work, but for most of these services, there's no guarantee of where the server is/will be. You might get a box in California or you might get a box in Canada. I'd definitely recommend that you go with a service like Linode or Slicehost, where you can specifically choose where you want to deploy your installation.

Hope this helps and good luck!

mattbasta
+1  A: 

Its not clear from your post what the problem you're trying to solve is: so what if it takes half a second. Or do you mean that you are running this synchronously with the user request? In which case, you should move your code to run after the webserver has completed processing the user request, flushed the buffers and closed the connection to the client - using the register_shutdown_function() (and disable keep-alives for that request).

Alternatively fire out some UDP packets or an email.

C.

symcbean