Philosophical methods of query process play a pivotal role in data retrieval from social networks linked to a graph NoSQL database that consolidate massive types of data. This massive data called as big data need to be distributed and sharded across many adjacent machines so that the queries when posted can be retrieved faster. An efficient storage mechanism for flexible retrieval of a query by the user needs to be established in Neo4j High Availability graph NoSQL database for less time overhead query process. The main focus of this paper is how to share the database constituting data across machines such that the storage of all related data comes in same or adjacent machines. This graph NoSQL database allocation problem referred as Neo4j High Availability big data allocation has been proved to be NP-Hard in this paper. To solve this hard problem, an optimization strategy by integrating Best Fit Decreasing with Ant Colony Optimization-based metaheuristic algorithm is suggested and implemented and results are analyzed. This data allocation in a distributed master–slave architecture of Neo4jHA is evaluated based on simulation, and performance is compared on the query efficiency of the proposed method to other best data allocation heuristic algorithms like First Fit, Best Fit, First Fit Decreasing and Best Fit Decreasing available in literature so far. The results exhibit how the proposed algorithm with replication and relation outperforms in query execution compared to other data allocation methods without relation and replication.