We have a iOS app.We use HTTP services for getting and posting JSON data. Push notifications also enabled. If backend services are down is there any way to notify the user that services are down
did you try having a timout? if the app can't connect to the server for some time, not only the connection attempt nearly always terminates, but it also raises a timeout exception on most of the programming languages I use. try to check timeout specifications on the object you use to communicate via http, you're probabely able to implement them. if you can't connect to the server in order to receive the http message simply tell the user "server unavailable" or something like that.
ideally, if you know the backend server will be dead for a while (for update purposes etc.) and you still can use the http server, you may send an http containning text saying something like "server unavailable", or you may just send an empty message and then detect it on the front end.(that is if you never send empty messages, anyways I think it'll give you issues. "server unavailable" should be better.).
if the http server will be periodically unavailable, try something like implementing update notifications. when you start up the app, the app asks when does a server update will occur. and then you save it, and when it starts up again, it checks whether or not such an update is happening at the moment. besides that, if you really want to use push notifications and it'll be periodically unavailable, before the server gets down - send a notification. really you just need to use your imagination here.
but what you can't do - is send a notification when your server is down, if you don't know it'll get down. mainly because you have no way of notifying the client (because the server you use for communication is down). however - as I stated above - what you can do is have the client checking for when the server is down(if it can't connect etc.). if you have a backup server you can send a notification when the server gets down. if both the server and the backup server gets down, if only the backup server needs to inform you - the client will most likely won't know it's down. you may use an external company to be your backup server. so if the electricity is down (or something like that) it won't affect your notification system.
hope it helps.