One or more embodiments of the present description provide a data storage method and device, an electronic device and a storage medium, wherein the method is applied to physical nodes in a distributed key-value pair storage system and can comprises: storing data sent by a client, determining the physical nodes to be a master node of the data by the client performing calculation on the data based on a consistency Hash algorithm; determining a standby node for storing the data; and sending the data to the standby node, so as to enable the standby node to store the data.
展开▼