Blockchain is a decentralized ledger that serves as the foundation of Bitcoin and has found applications in various domains due to its immutable properties. It has the potential to change digital transactions drastically. It has been successfully used across multiple fields for record immutability and reliability. The consensus mechanism is the backbone of blockchain operations and validates newly generated blocks before they are added. To verify transactions in the ledger, various peer-to-peer (P2P) network validators use different consensus algorithms to solve the reliability problem in a network with unreliable nodes. The security and reliability of the inherent consensus algorithm used mainly determine blockchain security. However, consensus algorithms consume significant resources for validating new nodes. Therefore the safety and reliability of a blockchain system is based on the consensus mechanism's reliability and performance. Although various consensus mechanisms/algorithms exist, there is no unified evaluation criterion to evaluate them. Evaluating the consensus algorithm will explain system reliability and provide a mechanism for choosing the best consensus mechanism for a defined set of problems. This article comprehensively analyzes existing and recent consensus algorithms' throughput, scalability, latency, energy efficiency, and other factors such as attacks, Byzantine fault tolerance, adversary tolerance, and decentralization levels. The paper defines consensus mechanism criteria, evaluates available consensus algorithms based on them, and presents their advantages and disadvantages.