awright.. heres a scenario.. mywebsite.com is hosted at sharedhosting9999.com now if sharedhosting9999.com is down.. mywebsite.com points to another sharedhosting0000.com where i got backup files for visitors to see.. i hope i get myself cleared.. the idea is.. if one host is down.. visitors view my website on the second host.. so 100% uptime.. is it possible? how will one setup DNS and things like that.. kindly putin your ideas..!
Look into IP failover. If you are comfortable with managing your own VPS, I would highly suggest looking into Linode.com and getting two VPSes in two different datacenter locations. This should effectively allow you to have a high availability website for a minimum cost of $40/month (2 VPSes). I realize you asked for two different companies but this would allow you to do what you want at a low cost. Using two different hosts would likely be overly complicated.
Create a nameserver with more than one ip and if 1 server is down it will go to the other its something like that
I know dns round robin works like sending your visitors randomly to the two ip/server. But say, if the other ip ( A Record) fails, does it mean that everything goes to the second ip?
No. If a A record of a 'down' server is passed, the browser won't connect and will cache that record. You can have it so each DNS server only returns the A record of its own server, but if Apache fails and Bind/Named doesn't, your in the same situation as the above.
You can't do with shared hosting alone, you will need another server in front to act as a director to direct the traffic to the hosting that is up. Since the configuration won't be cheap, no one using such a system will be doing it for shared hosting alone. Normally it is one director (can be a server) and two servers at least.