A method comprising: receiving, at a memory host of a distributed storage system, a write request from a client device to write a block of client data in random access memory, RAM, of the memory host; determining by the memory host, whether to allow the write request by: determining whether the client device has permission to write the block of client data at the memory host; determining whether the block of client data is currently saved at the memory host; and determining whether a free block of RAM is available, wherein when the client device has permission to write the block of client data at the memory host, the block of client data is not currently saved at the memory host, and a free block of RAM is available, the write request is allowed; and when the write request is allowed, allowing, at the memory host, the client device to write the block of client data to the free block of RAM; periodically determining, at the memory host, an amount of spare RAM available on the memory host; determining, at the memory host, whether the amount of spare RAM satisfies a threshold amount comprising at least one free block of RAM; and when the amount of spare RAM satisfies the threshold amount, allocating, at the memory host, the at least one free block of RAM to a free block queue, wherein determining whether a free block of RAM is available comprises determining whether at least one free block of RAM has been allocated to the free block queue; and characterized in that: when the amount of spare RAM fails to satisfy the threshold amount, selecting and deleting one or more blocks of client data from the memory host, wherein a selection criterion includes a priority indicating a likelihood of data replication of the one or more blocks of client data across multiple memory hosts of the distributed storage system, wherein a lower priority increases a likelihood of selection. receiving, at a memory host of a distributed storage system, a write request from a client device to write a block of client data in random access memory, RAM, of the memory host; determining by the memory host, whether to allow the write request by: determining whether the client device has permission to write the block of client data at the memory host; determining whether the block of client data is currently saved at the memory host; and determining whether a free block of RAM is available, wherein when the client device has permission to write the block of client data at the memory host, the block of client data is not currently saved at the memory host, and a free block of RAM is available, the write request is allowed; and determining whether the client device has permission to write the block of client data at the memory host; determining whether the block of client data is currently saved at the memory host; and determining whether a free block of RAM is available, wherein when the client device has permission to write the block of client data at the memory host, the block of client data is not currently saved at the memory host, and a free block of RAM is available, the write request is allowed; and when the write request is allowed, allowing, at the memory host, the client device to write the block of client data to the free block of RAM; periodically determining, at the memory host, an amount of spare RAM available on the memory host; determining, at the memory host, whether the amount of spare RAM satisfies a threshold amount comprising at least one free block of RAM; and when the amount of spare RAM satisfies the threshold amount, allocating, at the memory host, the at least one free block of RAM to a free block queue, wherein determining whether a free block of RAM is available comprises determining whether at least one free block of RAM has been allocated to the free block queue; and characterized in that: when the amount of spare RAM fails to satisfy the threshold amount, selecting and deleting one or more blocks of client data from the memory host, wherein a selection criterion includes a priority indicating a likelihood of data replication of the one or more blocks of client data across multiple memory hosts of the distributed storage system, wherein a lower priority increases a likelihood of selection.