The advent of cloud computing has witnessed a sharp augmentation in the amount of application data, the result of which gives more and more prominence to a personalized recommendation technique, which has been used by different kinds of Web applications. However, traditional collaborative filtering (CF) techniques, when applied to cloud computing which features a huge scale and distributed processing architecture, are confronted with some problems, such as low recommendation accuracy, long recommendation time and high network traffic. Consequently, the performance of recommendation mechanisms degrades drastically. To address this issue, a CF recommendation mechanism for cloud computing (RAC) is proposed in this paper. RAC first employs a candidate neighbor, the definition of which will also be given, to screen those items which exert great influence on the recommendation results. Then a 2-stage rating indexing structure based on distributed storage system will be constructed to ensure the quick and precise location of CN by RAC. On this basis, a CN-based CF recommendation algorithm CN-DCFA which searches k nearest neighbors between candidate neighbors can be provided. Meanwhile, CN-DCFA utilizes similarity to predict the recommendation results top-N of active users. Experiments have showed that our recommendation mechanism RAC, enjoying great efficiency and exactitude, is worthy of recommendation.