Customize adapter to support HA scenario in server



I have 2 server end points in active/standby mode. Ember adapter points to one server. Now if this server goes down, i would like to connect to second server.

I tried handling this through error function from application. And tried to save transition to a mem storage. Later tried to recover this transition by changing hosts to new server.

I am not sure whether this is a clean approach or correct one. please advise.