In a master-slave replication environment, what is required to automatically promote the slave as the master if the master goes down. What are common practice used to change the database reference from an application if the heartbeat of the master database is not detected?
Do I need a cluster to achieve this or is simple 2 machine environment sufficient?
This is not something you can do with MySQL alone, at least in versions up to 5.5. An additional tool, like Tungsten Replicator, can help you to automate the process.
If you're using MySQL in a mission-critical environment, there are a lot of possible routes to high availability. You can contract Oracle support, or an expert support and consulting firm, like Percona or SkySQL, to help you select and deploy the best configuration for your needs.