To see this, consider the system without any user caches, i.e., $M_U=0$, which is equivalent to a distributed storage system with unreliable servers, where random $P-\rho$ out of $P$ servers are inactive. It is known that MDS codes provide much higher reliability and efficiency compared to replication in this scenario [@dimakis_networkcodes]. On the other hand, when the servers are reliable, i.e., $\rho = P$, our system is equivalent to the one in [@maddah], and coded delivery provides significant reductions in the delivery latency. Accordingly, our proposed scheme brings together benefits from coded storage and coded delivery. To illustrate the main ingredients of the proposed scheme we assume $M_S=\frac{N}{\rho}$ in this section, and extend to other server capacities in later sections.

Server Storage Placement  {#sec:serverstorage}
-------------------------

We first describe how the files are stored across the SBS servers in order to guarantee that each user request can be satisfied from any $\rho$ servers a user may connect to (see Fig. \[fig:seg\]). We define $t \triangleq \frac{KM_U}{N}$, and assume initially that $t$ is an integer, i.e., $t\in [0:M_U]$. The solution for non-integer $t$ values will be obtained through memory-sharing [@maddah]. Each file is divided into $K\choose t$ equal-size non-overlapping segments. We enumerate 