{'fraction_non_alphanumeric': 0.036994594594594594, 'fraction_numerical': 0.011502702702702703, 'mean_word_length': 4.152166648100701, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Content Replication in Large Distributed Caches

In this paper, we consider the algorithmic task of content replication and request routing in a distributed caching system consisting of a central server and a large number of caches, each with limited storage and service capabilities. We study a time-slotted system where in each time-slot, a large batch of requests has to be matched to a large number of caches, where each request can be served by any cache which stores the requested content. All requests which cannot be served by the caches are served by fetching the requested content from the central server. The goal is to minimize the transmission rate from the central server. We use a novel mapping between our content replication problem and the Knapsack problem to prove a lower bound on the transmission rate for any content replication policy. Using insights obtained from the mapping, we propose a content replication policy - Knapsack Storage - which achieves this lower bound. While it intuitively makes sense to replicate the more popular contents on a larger number of caches, surprisingly, in certain cases, the Knapsack Storage policy chooses not to replicate the most popular contents on the caches at all.


I. INTRODUCTION
Video on Demand (VoD) services like Netflix [1] and Youtube [2] account for ever-increasing fractions of Internet traffic. This fraction is expected to cross 50% by 2018 [3]. Most VoD services use distributed Content Delivery Networks (CDNs) to serve their customers. Caching content closer to the network edge, i.e., close to the end users is an effective mechanism to reduce the load on the network backbone, thus reducing the bandwidth consumption of the network. The scope for cost savings and performance benefits from caching increases as the cost of memory continues to drop at a higher rate than that of transmission gear [4].
In this work, we focus on the task of content replication in a cache cluster consisting of multiple caches, each with limited storage and service capabilities, connected to a common root node that has a link to the central server as shown in Figure  1. For example, the root node could represent an ISP using multiple caches to serve users in a specific geographical area and central server represents core network. This cache cluster need not necessarily be a stand-alone network, but could in fact be a part of a larger tree topology [4].
As discussed in [5], [11]- [15], the system operates in two distinct phases. The first phase is the placement phase where content is replicated on the caches based on the statistics of the user demands. In the second phase, called the delivery phase, user requests are served using the caches and transmission from the central server via the root node. Since each cache can only store a small subset of the contents offered by the VoD service, optimizing content replication in the placement phase is critical for the efficient service in the delivery phase.
Most popular VoD services serve a large number of users and have extremely large content catalogs, e.g., YouTube serves over a billion users and offers close to a billion hours of content [6]. Both these factors need to be incorporated into algorithm design and performance analysis for such networks. Motivated by this, we focus on the asymptotic setting where the number of different contents offered by the service is large, and a large batch of user requests arrive at the beginning of each time-slot. Since the caches have limited service capacity, the incoming requests have to be matched to the caches such that no cache is allocated more than one request in each time-slot. All requests which can't be served by the local caches are served by the central server which stores the entire catalog of contents offered by the VoD service. The goal is to optimize content replication on the caches and design a computationally efficient request matching policy to minimize the rate of transmission from the central server to the root node.
Recently, two other settings have been used to model such CDNs. Similar to our setting, the setting in [7]- [10] allows each request to be served by any one of the caches, as long as no cache serves more than one request at any given time. However, in [7]- [10], the central server communicates with each user via an independent link. The setting in [5], [11]- [15] is different from our setting as it pre-assigns each user to a specific cache.
We compare and contrast the optimal content replication strategies for our setting and the two settings described above. Our larger goal and a key contribution of this work is to develop a comprehensive understanding of the effects of the structure of the underlying network on the nature of the optimal content replication strategies.

A. Contributions
The main contributions of our work can be summarized as follows.
(i) Converse Results: We use a novel mapping between our content replication problem and the Knapsack problem to lower bound the expected transmission rate for all content replication policies which do not use coded caching (Theorem 1). We also prove a stronger information-theoretic converse which lower bounds the expected transmission rate for all content replication policies if content popularity follows the Zipf's law (Theorem 3). These results can be extended to the case where content popularity follows the Zipf-Mandelbrot law [24]. (ii) Our Policy: Using the insights obtained from the mapping, we propose a content replication and request matching policy which solves a fractional knapsack problem to determine which contents to store on the caches. We show that our policy is optimal if content popularity follows the Zipf's law (Theorem 2). This result can be extended to the case where content popularity follows the Zipf-Mandelbrot law. Surprisingly, in certain cases, our content replication policy does not cache the most popular contents. Intuitively, in order to serve all the requests for a popular content via the caches, the content needs to be replicated on a large number of caches, since each cache can only serve one request at a time. It follows that, at times, it is better to serve all the requests for a popular content via a single transmission from the central server, instead of replicating it on a large number of caches, thus using up a lot of memory resources. (iii) Comparison with other Settings: As mentioned before, for the settings studied in [5], [14], [16], coded caching is necessary for optimal performance. The only difference between our setting and the setting in [5], [14], [16] is that in [5], [14], [16], each request is pre-assigned to a specific cache, whereas, in our setting, each request can be matched to any one of the caches. We show that this added flexibility in matching requests to caches eliminates the need of coding for optimal performance.
Another key insight we obtain is that unlike our policy, the optimal policies for the two alternative settings discussed above, store the more popular contents on a larger number of caches.

II. SETTING
We study a distributed caching system consisting of a central server, and m caches, each with limited storage and service capabilities, connected to the central server via a root node (Figure 1). The system offers a content catalog consisting of n contents, where n scales linearly with respect to m, i.e., n = cm where c is a constant. We are interested in the asymptotic performance of the system as n, m → ∞ to model the enormous content catalogs offered by most large scale content delivery systems.

A. Storage Model
The central server stores the entire catalog of contents offered by the content delivery system, and each of the m caches can store k units of data. Let b i denote the units of storage required to store a copy of Content i.

B. Request Model
We consider a time-slotted system where a batch ofm = Θ(m) requests arrives at the beginning of each time-slot. Each request is generated according to an independent and identically distributed process. The probability that a request is for Content i is denoted by p i . We use the Zipf distribution to model the popularity of contents as empirical studies of many VoD services have shown that the content popularity profile matches well with such distributions, see e.g., [17]- [23].
Assumption 1: Zipf Popularity Without loss of generality, contents are indexed in decreasing order of popularity with p i ∝ i −β , where β > 0 is a constant, known as the Zipf parameter. All the results in this paper can be extended to the case where content popularity follows the Zipf-Mandelbrot law [24].

C. Service Model
Each request can be served in one time-slot by any one cache which stores the requested content, and each cache can serve at most one request in each time-slot. In each time-slot, all the requests that cannot be served by the caches are served by fetching the requested content from the central server via the root node.

D. Goal
The goal is to determine what to store in the caches, and how to match incoming requests to the caches in order to minimize the expected transmission rate from the central server needed to serve all the requests arriving in a time-slot.

III. PRELIMINARIES
The fractional knapsack problem [25] can informally be defined as follows: choose items to keep in the knapsack such that the cumulative value of the items is maximized, while ensuring that the cumulative weight of the items is not more WLOG, let the items be indexed in decreasing order of value to weight ratio, i.e., v1 The solution to the fractional knapsack problem is: Remark 1: The solution to the fractional knapsack problem can be computed in O(J log J) time.

IV. MAIN RESULTS AND DISCUSSION
In this section, we state and discuss our main results. The proofs are provided in Section VI and the Appendix.

A. Converse without Coding
In this section, we compute a lower bound on the expected transmission rate from the central server for all policies which do not use coding. Theorem 1 provides a lower bound on the expected tranmission rate for the case where each request arrives according to an independent and identically distributed process.
Theorem 1: Consider a distributed cache system with n contents, m caches, and a batch ofm requests arriving at the beginning of each time-slot. Each request is generated according to an independent and identically distributed process, and the probability that a request is for Content i is denoted by p i . Let R * NC denote the minimum transmission rate required to serve all requests arriving in a time-slot, and let Content i need b i units of storage. Then, we have that, Remark 2: The quantity O * defined in Theorem 1 is the solution to the fractional knapsack problem described in Section III with: -The value of bit u of Content i, is the probability that Content i is requested at least once in the time-slot. -The weight of bit u of Content i, is the total memory of the m caches.
x i,u = 1 implies that mp i copies of bit u of Content i are stored in the knapsack, and, x i,u = 0 implies that bit u of Content i is not stored in the knapsack. Theorem 1 lower bounds the expected transmission rate by which is the expected number of bits not stored in knapsack and requested at least once. Next, we evaluate the lower bound on the expected transmission rate obtained in Theorem 1 for the case where content popularity follows the Zipf distribution. Numerous empirical studies for many content delivery systems have shown that the distribution of popularities matches well with such distributions, see e.g., [17]- [23].
Corollary 1: Consider a distributed cache system with n contents, m caches, and a batch of m requests arriving at the beginning of each time-slot. Each request is generated according to an independent and identically distributed process, and the probability that a request is for Content i is denoted by p i . If the p i s follow the Zipf distribution with Zipf parameter β, i.e., p i ∝ i −β , Letĩ = (mp 1 ) 1/β and r i be the value to weight ratio of a bit of content i. We have that, Given this, dr i di > 0, for i ≤ĩ − 1, and dr i di < 0, for i ≥ĩ.
Therefore, r i increases from i = 1 toĩ − 1 and decreases from i =ĩ to n. For example, Figure 2 illustrates how the ratio of the value to weight ratio for n = m = 100, and β = 1.2 varies as a function of content index.  Given this, and the fact that the solution to the fractional knapsack problem (Section III) is obtained by ranking items in decreasing order of value/weight ratio and choosing the maximum number of highest ranked items such that their cumulative weight is less that the knapsack capacity, the optimal solution to the fractional knapsack solution has the following structure: ∃ i min , i max with i min ≤ĩ ≤ i max , such that, We optimize over i min and i max to get a lower bound on the expected transmission rate for particular values of c, k and m. For example, Table I shows the results for the case where b i = b ∀i, and content popularity follows the Zipf distribution with Zipf Parameter β, such that 1 < β < 2. Typical values of β for most Video on Demand services lie between 0.6 and 2 [17]- [23]. For β < 1, the Zipf distribution is not well defined in the limit as n → ∞, and therefore, for the asymptotic results obtained in Table I, we focus our attention on the case where 1 < β < 2.
Remark 3: The key insights from the optimal solution to the fractional knapsack problem in Corollary 1 are: -For contents expected to be requested at least once, i.e., Contents i such that mp i ≥ 1, it is optimal to store contents with lower popularity. Intuitively, given that two contents are going to be requested at least once each, all the requests for the less popular content can be served using fewer caches and a lesser amount of storage than the more popular content. Therefore, between the two contents, storing the less popular content reduces the transmission rate by b units using fewer memory resources. -For contents expected to be requested at most once, i.e., Contents i such that mp i < 1, it is optimal to store the more popular contents. Intuitively, between two contents with the same weight, storing the more popular content increases the probability of reducing the transmission rate required to serve incoming requests, while using the same amount of memory resources.
B. Our Policy 1) Storage Policy: Knapsack Storage: We use the insights obtained from Theorem 1 to design a storage policy. In Theorem 1, we use the solution to the fractional knapsack problem with appropriate values and weights for the contents to lower bound the expected transmission rate. Inspired by this, we propose a storage policy called the Knapsack Storage policy. We describe the Knapsack Storage policy in two parts.
Knapsack Storage: Part 1 -The first part of the Knapsack Storage policy determines how many caches each content is stored on by solving a fractional Knapsack problem. The parameters of the fractional knapsack problem are as follows: is the probability that Content i is requested at least once in the time-slot. -The weight of Content i (w i ) represents the number of caches Content i will be stored on if selected by the Knapsack problem. If we decide to store a content on the caches, we would like to ensure that all requests for that content can be served by the caches, so that the content need not be transmitted by the central server. To ensure this, we fix w i to be high enough to ensure that with high probability, i.e., with probability → 1 asm, m, n → ∞, the number of requests for Content i in a time-slot is ≤ w i . We use the following values for the w i s: -For simpilicity, we assume that all contents are of equal size and need b units of storage each.
1: Solve the following fractional knapsack problem where v i s and w i s are as defined in Definition 1. 2: The set of contents to be stored  Since the value of Content is the expected number of contents that are not stored in the knapsack and requested at least once. As a result, maximizing n i=1 x i v i minimizes the expected number of contents that are not stored in the knapsack and requested at least once, which is equivalent to minimizing the expected transmission rate.
Recall from Section III that the optimal solution to the fractional knapsack problem prioritizes selecting contents with larger value to weight ratios. Therefore, for certain values of the system parameters (n, m,m, k), the optimal solution to the fractional knapsack problem in Figure 3 does not store the most popular contents on the caches. As discussed in Remark 3, intuitively, in order to serve all the requests for a popular content via the caches, the content needs to be replicated on a large number of caches, since each cache can only serve one request at a time. It follows that, at times, it is better to serve all the requests for a popular content via a single transmission from the central server, instead of replicating it on a large number of caches, thus using up a lot of memory resources.
Knapsack Storage: Part 2 -The next decision to be made is which contents to store on which caches, i.e., how to partition the set of contents selected by Knapsack Storage: Part 1 (Figure 3) into m groups with k/b contents each.
1: Order content copies in S obtained in Knapsack Storage: Part 1 ( Figure 3) in increasing order of content index. 2: Store content copy ranked r in the ordered sequence on cache ((r − 1) mod m + 1).   2) Matching Policy: Match Least Popular: The next task is to match requests to caches. The key idea of the Match Least Popular policy is to match requests for the less popular contents before matching requests for the more popular contents. Please refer to Figure 6 for a formal description of the Match Least Popular policy.  Remark 6: Match Least Popular can be implemented by going through the set of m requests twice as follows: the first pass is used to tabulate how many times each content is requested, and the second pass is used to match these requests to caches in increasing order of content popularity. Therefore, the Match Least Popular policy can be implemented in O(m) time where m is the number of caches as well as the number of requests arriving in each time-slot.
The next theorem evaluates the performance of the Knapsack Store + Match Least Popular (KS+MLP) policy for the case where content popularity follows the Zipf distribution (Assumption 1). We focus on this case because empirical studies of many VoD services have shown that the content popularity profile matches well with such distributions, see e.g., [17]- [23].
Theorem 2: Consider a distributed cache consisting of a central server and m caches that offers a catalog of n contents. Let a batch of m requests arrive in each time-slot and R KS+MLP be the transmission rate for the Knapsack Store + Match Least Popular policy when content popularity follows the Zipf distribution (Assumption 1) with Zipf parameter β > 1. Let the number of requests arriving in each time-slot be equal to the number of caches. Then, we have that, for n large enough, such that x i is the solution of the fraction knapsack problem solved in Knapsack Storage: Part 1, and w.h.p. means with probability Table II shows the results for the case where b i = b ∀i, and content popularity follows the Zipf distribution with Zipf Parameter β, such that 1 < β < 2. Typical values of β for most Video on Demand services lie between 0.6 and 2. For β < 1, the Zipf distribution is not well defined in the limit as n → ∞, and therefore, for the asymptotic analysis, we focus our attention on the case where 1 < β < 2. In Section V, we evaluate the performance of the Knapsack Storage + Match Least Popular for the case where 0.6 < β < 1 for finite values of n via simulations.
From Tables I and II, we conclude that if content popularity follows the Zipf's distribution with 1 < β < 2, the Knapsack Storage + Match Least Popular policy is order-optimal in the class of policies which do not use coded caching. Using Theorems 1 and 2, it can be shown that this holds even for Zipf parameter β ≥ 2. This is one of the key results of this paper.
All our results can easily be extended to the case where content popularity follows the Zipf-Mandelbrot law instead of the Zipf's law. We skip the details due to lack of space.

C. Alternative Distributed Caching Settings
We now compare various distributed caching settings studied thus far. In all these setting, the goal is to minimize the rate of transmission from the central server to the users. For each setting, the questions we are trying to answer are: Q1: What is the optimal caching scheme? Q2: Can coded caching significantly improve performance? We refer to our setting as Setting A. As discussed in the introduction, there are two other caching settings (Settings B and C) studied so far. We include a possible fourth setting (Setting D) for the sake of completeness.
-Setting A: Flexible matching between users and caches, the central server serves requests which cannot be served by the caches via the root node (our setting). -Setting B: Fixed matching between users and caches, the central server broadcasts information to all the users [5], [11]- [14], [16]. -Setting C: Flexible matching between users and caches, independent unicast communication between each user and the central server [7]- [10]. -Setting D: Fixed matching between users and caches, independent unicast communication between each user and the central server. 1) Setting A-Our Setting: Theorem 1 provides a lower bound on the transmission rate of all policies which do not use coded caching. If content popularity follows the Zipf distribution, our next result provides a stronger informationtheoretic converse which lower bounds the performance of all caching policies, including those which employ coded caching.
Theorem 3: Let content popularity follow the Zipf distribution with Zipf parameter β > 1, and E[R * Zipf ] denote the minimum expected transmission rate required to serve all requests arriving in a time-slot. Then, we have that We now use Theorems 2 and 3 to compare the performance of our policy with the performance of the optimal policy.
Corollary 2: Let content popularity follow the Zipf distribution with Zipf parameter β > 1. Let n = cm,m = m and each cache have the storage capacity to store exactlyk complete equal sized contents. From Theorems 2 and 3 we have that, ∃ constants c 1 and c 2 such that: Remark 7: We thus conclude that for Setting A, if content popularity follows the Zipf's law, the Knapsack Storage + Match Least Popular policy, which does not use coded caching is optimal up to a constant multiplicative factor and a constant additive term fork ≤ c − 1 andk > c . This is one of the key results of this paper. If coding can reduce the required transmission rate in the case wherek = c remains an open question.
2) Setting B-Fixed Matching with Broadcast: The optimal expected broadcast rate (up to a constant multiplicative and additive gap) for this setup, with an arbitrary popularity distribution, is given by [14][Theorem 1, Theorem 2]. The proposed scheme uses coded caching and achieves an expected broadcast rate of where each cache can storek contents and n 3 is an integer that satisfies mkp n3 ≥ 1 and mkp n3+1 < 1. Here, n 3 is the number of contents for which are stored in the caches [5].
Consider the Zipf distribution with Zipf parameter β > 1. Then n 3 = Θ min{(km) 1/β , n} , and therefore the achievable expected rate is given by The conventional uncoded caching and delivery scheme would be to store the most populark contents in each cache and simply broadcast those requested contents which have not been stored. The expected broadcast rate for this scheme is Therefore, for the Zipf distribution with β > 1, (2) Considerk = m 1/β . Comparing the coded caching and conventional caching rates using (1) and (2), we have which can grow arbitrarily large as m → ∞. Therefore, for this setting, optimal performance cannot be achieved without using coded caching, and the optimal policy stores the more popular contents. This result can be extended to the case where content popularity follows the Zipf-Mandelbrot law. We skip the details due to lack of space.
3) Setting C-Flexible Matching with Unicast: We first focus on the case where each cache can store exactly one content, i.e.,k = 1. The next theorem provides a lower bound on the transmission rate for all policies which do not use coded caching.
Theorem 4: For Setting C, let C * (1) be the minimum transmission from the central server needed to serve all requests which arrive in a time-slot if each cache has sufficient storage capacity to store exactly one complete content. If each request is generated by an i.i.d. process such that the probability of a request for Content i is p i , then we have that, where v i,j = m k=j m k p k i (1 − p i )m −k is the probability that Content i is requested at least j times in a batch of requests.
Consider the following storage policy: store at most one content per cache with Content i stored on c i caches, such that, c i = m i=1 y i,j , where the y i,j s are the solution to the following optimization problem: Note that the expected transmission from the central server for this policy matches the minimum expected transmission rate obtained in Theorem 4. It follows that this policy is optimal for Setting C if each cache can store exactly one content. Since v i1,j ≥ v i2,j if p 1 ≥ p 2 , this policy stores the more popular contents on a larger number of caches.
Corollary 3: For Setting C, if content popularity follows the Zipf popularity (Assumption 1),m = m, and each cache can store exactly one complete content, under the optimal policy, the expected number of unicast transmission required from the central server in a time-slot is O(m 1/β log m).
From Theorem 2, we know that if content popularity follows the Zipf's law, the Knapsack Storage + Match Least Popular policy is optimal up to a constant additive term for Setting A. Next, we evaluate the performance of the Knapsack Storage + Match Least Popular policy for Setting C.
Corollary 4: Let content popularity follows the Zipf popularity (Assumption 1) with Zipf parameter β > 1,m = m, and each cache has sufficient storage capacity to storek ≥ 1 complete contents. For Setting C, under the Knapsack Storage + Match Least Popular policy, for n large enough, 1) Ifk = 1, the expected number of unicast transmissions required from the central server in a time-slot is Θ(m). 2) Ifk ≥ c + 2, the expected number of unicast transmission required from the central server in a time-slot is o(1). k = c + 2) is sufficient to ensure o(1) transmission rate from the central server. We thus conclude that coded caching is not necessary for optimal performance in this setting. 4) Setting D-Fixed Matching with Unicast: In this setting, since each request can only be served by a pre-determined cache and the central server communicates with each user separately, the distributed caching problem decouples into m independent single cache problems where the goal is to minimize the probability that the requested content is not stored in the cache. It is straightforward to see that in this setting if a cache can storek complete contents, the optimal caching policy which does not use coding is to store thek most popular contents.

V. SIMULATIONS
In this section, we compare the performance of the Knapsack Storage + Match Least Popular (KS+MLP) policy with the lower bound on the performance of all storage policies which do not use coded caching.
We simulate a distributed cache system for arrival processes which satisfy Assumption 1 to understand how the performance of the KS+MLP policy depends on various parameters like number of contents (n), number of caches (m), storage capacity per cache (k), and Zipf parameter (β). We focus on the case where the number of requests per time-slot is equal to the number of caches. For each set of system parameters, we report the mean transmission rate averaged over 10000 iterations.
In Figure 7, we plot the mean transmission rate for the KS+MLP policy and the lower bound on the expected transmission rate as a function of the number of contents (n), for a system where the number of caches (m) is one fifth of the number of contents (n = 5m), and each cache can store three contents (k = 3). In this regime, our theoretical results suggest that the mean transmission rate for the KS+MLP policy is O(n 2−β ) and the lower bound on the expected transmission rate to be Ω(n 2−β ). We see that the mean transmission rate for the KS+MLP policy is very close to the lower bound and both are decreasing functions of β.
In Figure 8, we plot the mean transmission rate for the KS+MLP policy and the lower bound on the expected transmission rate as a function of the number of contents (n), for a system where n = 15m and each cache can store sixteen contents (k = 16). In this regime, our theoretical results suggest that the mean transmission rate for the KS+MLP policy is upper bounded by one, with high probability and the lower bound on the expected transmission rate is zero.
In Figure 9, we plot the mean transmission rate for the KS+MLP policy and the lower bound on the expected transmission rate as a function of the storage per cache (k) for a system with 1000 contents (n = 1000) and 100 caches (m = 100). We see that the mean transmission rate for the KS+MLP policy is very close to the lower bound on the expected transmission rate and as expected, both are decreasing function of the storage per cache (k). In Figure 10, we plot the mean transmission rate for the KS+MLP policy and the lower bound on the expected transmission rate as a function of the Zipf parameter β. Typical values of β for video of demand systems lie between 0.6 and 2 [17]- [23]. We simulate a system with 1000 contents (n = 1000) and 200 caches (m = 200) for two different values of storage per cache. We see that the mean transmission rate for the KS+MLP policy is very close to the lower bound on the expected transmission rate and as expected, both the mean transmission rate for the KS+MLP policy and the lower bound on the expected transmission rate are decreasing functions of β.

VI. PROOFS
In this section, we prove some of the results discussed in Section IV. We use the following result multiple times in this section.  Lemma 1: For a Binomial random variable X with mean µ, by the Chernoff bound, for δ such that 0 < δ < 1,

A. Proof of Theorem 1
Proof of Theorem 1: Instead of lower bounding the expected transmission rate for the system described in Section II, we lower bound the expected transmission rate for an alternative system which is less restrictive and, therefore, more powerful than the system described in Section II. In the system described in Section II, each cache can serve at most one request in a time-slot. In the alternative system, we allow each cache to serve multiple requests in each time-slot as long as it serves at most one request for each content stored in the cache.
Let E[R * NC ] be the expected transmission rate for the system described in Section II, and E[R * NC ] be the expected transmission rate for the alternative system. Since the alternative system is less restrictive than the original system, it follows that, In the alternative system, for Content i such thatmp i ≥ 1, if the caching policy decides to store bit v of Content i on less thanmp i caches, the caches cannot servemp i or more requests for Content i in any given time-slot. Since the number of requests for Content i is at leastmp i with a constant probability, storing bit v of Content i such thatmp i ≥ 1 on less thanmp i caches adds a constant to the expected transmission rate and not storing bit v of Content i on the caches adds one unit to the expected transmission rate. Since we are interested in the order of the expected transmission rate as n, m,m → ∞, ifmp i ≥ 1, storing bit v of Content i on less thanmp i caches is equivalent to not storing bit v of Content i at all. Therefore, to make the most use of the available cache memory, we restrict ourselves to the case where if the caching policy decides to cache bit v of Content i, it is stored on at least max{mp i , 1} caches.
If the caching policy decides not to cache bit v of Content i, this bit will have to be transmitted if Content i is requested at least once in the batch ofm requests. The probability that Content i is requested at least once in the batch ofm requests otherwise. Since the system has m caches where each cache can store k bits of content, the expected transmission rate for the alternative system (E[R * NC ]) is lower bounded by the solution to the following optimization problem: By definition, O * 1 ≤ O * , therefore,

B. Proof of Corollary 1
Letĩ be the smallest value of i for which mp i < 1. For all i ≥ĩ, max{mp i , 1} = 1. Therefore, if content popularity follows the Zipf's law, O * is the solution to the fractional knapsack problem where the value of bit u of content i is 1 − (1 − p i ) m and its weight is mp i if i ≤ĩ−1 and 1 if i ≥ĩ. Let r i be the value to weight ratio of a bit of content i. We have that, Given this, dr i di > 0, for i ≤ĩ − 1, and dr i di < 0, for i ≥ĩ.
Therefore, r i increases from i = 1 toĩ − 1 and decreases from i =ĩ to n. Therefore, the optimal solution to the fraction knapsack solution has the following structure: ∃ i min , i max with i min ≤ĩ ≤ i max , such that, either, imax−1 i=imin max{mp i , 1} ≤ mk, and imax i=imin max{mp i , 1} > mk, and the optimal solution is and the optimal solution is We use this insight and optimize over the possible values of i min to compute a lower bound on E[R * NC ] for various values of the number of caches (m), number of contents (n = cm), storage per cache (k) and Zipf parameter (β).
We focus on the case where content popularity follows the Zipf distribution with Zipf Parameter β, with 1 < β < 2. Let i min = m α . Therefore, The cumulative weight of contents ranked between i max + 1 to n is Let F 1 be the event that not more than one request arrives for contents ranked between i max + 1 to n. Using the Chernoff bound (Lemma 1), P(F 1 ) ≥ O(ne −(log n) 2 ). Let F 2 be the event that at least one request arrives for contents ranked between one and i min . Using the Chernoff bound (Lemma 1), P(F 2 ) ≥ O(ne −(log n) 2 ). Therefore, We use the fact that, , and optimize over α to get the desired result for particular values of c, k and m. Please refer to Table I in Section IV for the results.

C. Proof of Theorem 2
If content popularity follows the Zipf distribution (Assumption 1) with Zipf parameter β > 1, andm = m, the weights of various contents in the Knapsack problem solved by Knapsack Storage: Part 1 are as follows: Definition 1: 4p 1 (log n) 2 for n 1 + 1 ≤ i ≤ n 2 1 for n 2 + 1 ≤ i ≤ n We use the following two lemmas in the proof of Theorem 2. The proofs are discussed in the Appendix.
Lemma 2: Let content popularity follow the Zipf distribution with Zipf parameter β > 1. In a given time-slot, let d i be the number of requests for Content i. Let E 1 be the event that: (a) d i ≤ 2p 1 (log n) 2 for n 1 < i ≤ n 2 , where n 1 , n 2 and w i are as defined in Definition 1. Then we have that, , where x i is the solution of the fraction knapsack problem solved in Knapsack Storage: Part 1. Let E 2 be the event that the Match Least Popular policy matches all requests for all contents in R to caches. Then we have that, Proof of Theorem 2: From Lemma 3, we know that, for n large enough, with probability ≥ 1 − O me −(log m) 2 , all requests for the contents caches by the KS+MLP policy are matched to caches. Letñ be the number of contents not in R (i.e., not cached by the KS+MLP policy) that are requested at least once in a given time-slot. Therefore, The results follow by solving the fractional knapsack problem defined in Figure 3 as a function of n, m, β andk to determine the set R. For a given set R, We omit the details due to lack of space.

D. Proof of Theorem 3
Proof of Theorem 3: In our setup, say System I, there are m users and m caches, each with a storage capacity of k bits. In each time-slot, each user requests for a content according to the Zipf distribution with parameter β. The least popular content (Content n) has popularity p n = O(n −β ). We are interested in establishing a lower bound on the expected rate for this system.
Consider an alternative setup, say System II, where we introduce a dummy empty content W 0 . Each user requests Content i for 1 ≤ i ≤ n with equal probability p = O(n −β ) and the empty content W 0 with probability 1−O(n 1−β ). Using the fact that each non-empty content is requested with higher probability in System I as opposed to System II, it can be shown that the expected transmission rate for System I is at least as large as the expected rate for System II.
Note that in System II, there will be O(m · n 1−β ) users requesting non-empty contents, with high probability as m grows large. Next, consider System III, where there is one combined cache of capacity mk and O(m · n 1−β ) users, all with access to the combined cache, and each requesting a non-empty content with uniform probability. It is easy to see that the expected rate for System II is at least as large as the expected rate for System III.
Finally, consider System IV, there is one combined cache of size mk and O(m·n 1−β ) users, all with access to the combined cache, and each requesting an arbitrary non-empty content. It follows from [12][Claim 1] that the expected rate for System III is within a constant multiplicative factor of the worst-case rate in System IV, maximized over all feasible request vectors.
Combining the observations above, we have that the expected transmission rate for System I (R * Zipf ) is at least as large as the worst-case rate in System IV (R * Zipf, IV ), up to a constant multiplicative gap. We now evaluate a lower bound on the worst-case rate for System IV. By considering multiple disjoint request vectors, each with unique requests made by every user, we have the following cut-set lower bound [5]: Since we havem requests arriving in each time-slot, the expected transmission rate from the central server is lower bounded bym − O c .

VII. RELATED WORK
The problem of content replication for distributed caches has been widely studied. In [7]- [10], [26], [27] the focus is on the setting where each request can be matched to any cache and the central server communicates with each user via an independent unicast transmission. In [9], [10] content popularity is unknown and time-varying, while [7], [8], [26], [27] study the setting where content popularity is either known or time-invariant or both. Unlike the Knapsack Storage policy, the proposed content replication policies in all these works store the more popular contents on a larger number of caches.
The setting where each user is pre-matched to a server and the central server communicates with the users via an error free broadcast link has been studied in [5], [11]- [14], [16]. The idea of coded caching was introduced in [5], [16]. The key result in [5], [11]- [14], [16] is that unlike our setting, coded caching is necessary for optimal performance. Variants of the two settings discussed above have been studied in [4], [28].

VIII. CONCLUSIONS
The setting considered in this paper is motivated by largescale distributed content delivery networks, used by Video on Demand services like Netflix and Youtube which have large content catalogs and serve a large number of users.
We draw a parallel between the caching problem and the Knapsack problem and use it to design a caching and request routing policy called Knapsack Storage + Match Least Popular. Surprisingly, our caching policy doesn't always cache the popular contents, and yet is order-optimal if content popularity follows the Zipf's law. We also conclude that for the setting we consider, close to optimal performance can be achieved without using coded caching.

APPENDIX
In this section, we prove some of the results discussed in Section IV and Section VI.
Proof of Lemma 2: Since content popularity follows the Zipf distribution with Zipf parameter β > 1, (a) For all contents less popular than Content n 1 , Therefore, by the Chernoff bound (Lemma 1), we have that, for n 1 < i ≤ n 2 , (b) For i ≤ n 1 , by the Chernoff bound (Lemma 1), .
For i ≤ n 1 , mp i = Ω((log m) 2 ), therefore, Therefore, by the union bound over all contents, we have that, P(E 1 ) = 1 − O(ne −(log m) 2 ). Proof of Lemma 3: Since the Match Least Popular policy matches requests to caches starting from the least popular contents, we first focus on requests for contents less popular than Content n 2 . Since content popularity follows the Zipf distribution with Zipf parameter β > 1, for i > n 2 , Each of these (ranked lower than n 2 ) contents is stored at most once across all caches. Therefore, under the Match Least Popular policy, a request for Content i for i > n 2 will remain unmatched only if the cache storing that content is matched to another request for Content i for some i > n 2 . Since each cache stores at mostk contents, the cumulative popularity of all contents less popular than Content n 2 stored on a cache is <kp n2 . Each unmatched request a Content i for i > n 2 corresponds to the event that there are at least two requests for thek contents less popular than Content n 2 stored on a cache. Therefore, by the Chernoff bound (Lemma 1), the probability that a particular request for a Content i for i > n 2 remains unmatched is ≤ exp − (log m) 2 kp 1 . By the union bound, the probability that at least one request for Content i ∈ R such that i > n 2 is not matched by the Match Least Popular policy is ≤ m exp − (log m) 2 kp 1 .
Next, we focus on contents ranked between 2 and n 1 . Note that, if the Knapsack Storage policy decides to store Content i, it stores it on w i caches.
Therefore, if contents are stored according to Knapsack Storage: Part 2, each cache stores at most one content with index i such that 2 ≤ i ≤ n 2 .
We now focus on requests for contents ranked between 2 and n 2 . Let D i be the set of caches storing Content i for 2 ≤ i ≤ n 2 . Let E 3,j be the event that cache j ∈ D i is matched to a request for Content i for i > n 2 . Since each cache stores at mostk contents, a cache is used to serve a request for Content i for i > n 2 only if at least one of the ≤k contents ranked lower than n 2 stored on the cache are requested at least once. Therefore, For a given constant δ < 1, ∃m(δ) such that for m ≥ m(δ), P(E 3,j ) ≤ δ.
For each Content i for n 1 < i ≤ n 2 , let E 4,i be the event that more than 2p 1 (log n) 2 of the 4p 1 (log n) 2 caches in D i are matched to requests for Content i for i ≥ n 2 . By the Chernoff bound for negatively associated random variables [29], P(E 4,i ) = O e −(log n) 2 .
From Lemma 2, we know that with probability ≥ 1 − O ne −(log n) 2 , there are less than 2p 1 (log n) 2 requests for each Content i for n 1 < i ≤ n 2 . Therefore, with probability ≥ 1 − O ne −(log n) 2 , all requests for contents in R ranked between n 1 and n 2 are matched to caches by Match Least Popular.
For each Content i for 2 ≤ i ≤ n 1 , let E 4,i be the event that more than p1 4 mp 1 of the w i caches in D i are matched to requests for Content i for i ≥ n 2 . By the Chernoff bound for negatively associated random variables [29], P(E 4,i ) = O e −(log n) 2 .
From Lemma 2, we know that with probability ≥ 1 − O ne −(log n) 2 , there are less than 1 + p1 4 mp i requests for each Content i for 2 ≤ i ≤ n 1 . Therefore, with probability ≥ 1 − O ne −(log n) 2 , all requests for contents in R ranked between 2 and n 1 are matched to caches by Match Least Popular.
We now focus on the requests for Content 1. Recall that if the Knapsack Storage policy decides to cache Content 1, it is stored on all m caches. Since the total number of requests in a batch is m, even if all requests for contents ranked lower than 1 are matched to caches, the remaining caches can be used to serve all the requests for Content 1.

Proof of Corollary 3
Lemma 4: Let content popularity follow the Zipf distribution with Zipf parameter β > 1. In a given time-slot, let d i be the number of requests for Content i. Let G 1 be the event that Proof: The number of requests for Content i is a Binomial random variable with mean mp i . Therefore, by the Chernoff bound (Lemma 1), P(d i ≥ mp i + √ mp i log n) ≤ e −(log m) 2 /3 .
Lemma 5: Let content popularity follow the Zipf distribution with Zipf parameter β > 1. In a given time-slot, let d i be the number of requests for Content i. Let G 2 be the event that otherwise.
The quantity n i=1 c i can be upper bounded by a suitable integral to show that n i=1 c i ≤ m, i.e., Proportional Storage is a feasible storage policy. We skip the details due to lack of space.
Recall that d i is the number of requests for Content i in a given time-slot. Therefore, under the Proportional Storage policy, the total number of transmissions from the central server is The rest of the proof is conditioned on events G 1 and G 2 as defined in Lemma 4 and 5. Conditioned on G 1 ∩ G 2 , the expected number of transmissions from the central server is upper bounded by By definition, this is also an upper bound on the expected number of transmissions from the central server for the optimal policy.

Proof of Corollary 4
Proof of Corollary 4: We consider the two cases separately.
1) Ifk = 1, by the definition of the Knapsack Storage policy (3), Content 1 is not stored on any of the m caches. Given this, under Setting C, each request for Content 1 leads to a transmission from the central server.
The expected number of requests for Content 1 in a timeslot is mp 1 = Θ(1), and therefore, the result follows. 2) Ifk ≥ c + 2, from the proof Theorem 2, we have that, with high probability, the Knapsack Storage + Match Least Popular policy serves all requests via the caches, i.e., no requests are served using the central server. Therefore, even for Setting C, the expected tranmission rate is o(1).