tags:

views:

43

answers:

2

My iPhone app communicates with a php script hosted on a server. Hard coded into the app is the domainname.com/phpscript.php?=data

If something happens to my domain name, the app won't work. Is there a best practice for handling this. Do you suggest a DNS or something? I'm just looking for ways to avoid a complete resubmission to apple, which takes a good 5 days.

A: 

Best practice would be to ensure the domain name never goes down.

You could also take that domain name, and set it up to handle data in a fault-free way such that the domain name resolves to a server that has a fallback plan if it goes down.

You could also design (the app) to try one of several servers, each pointing to their own copy of phpscript.php (make sure to sync them up) so that if one goes down the app can try the next one.

Josh K
appreciate the heads up Josh
BigMike
+1  A: 

When you say "if something happens to my domain name", do you mean losing the domain, or a server going down temporarily, or IP address renumbering, or what?

There are a few "solutions":

  • Use a "dynamic DNS" service to point to your server. Try those if your DNS goes down.
  • Use some free hosting sites (Google Pages, Google App Engine, etc) to redirect to your server. Try those if your server goes down.

Then, when the app fails to connect to the "normal" server, it can try the fallback servers. When you notice that something's gone wrong, you can reconfigure the other sites to point at a working server.

These only really help if you actually lose your domain (e.g. it expires and someone else buys it — don't let that happen in the first place!). You need to be able to bring up a second server at short notice in any case, and zones are supposed to have secondary nameservers in case the primary goes down.

tc.