{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/mcrouter/issues/114","repository_url":"https://api.github.com/repos/facebook/mcrouter","labels_url":"https://api.github.com/repos/facebook/mcrouter/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/facebook/mcrouter/issues/114/comments","events_url":"https://api.github.com/repos/facebook/mcrouter/issues/114/events","html_url":"https://github.com/facebook/mcrouter/issues/114","id":140572231,"number":114,"title":"Just Need Some Clarification on Cold Caches","user":{"login":"jamescarr","id":45389,"avatar_url":"https://avatars.githubusercontent.com/u/45389?v=3","gravatar_id":"","url":"https://api.github.com/users/jamescarr","html_url":"https://github.com/jamescarr","followers_url":"https://api.github.com/users/jamescarr/followers","following_url":"https://api.github.com/users/jamescarr/following{/other_user}","gists_url":"https://api.github.com/users/jamescarr/gists{/gist_id}","starred_url":"https://api.github.com/users/jamescarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamescarr/subscriptions","organizations_url":"https://api.github.com/users/jamescarr/orgs","repos_url":"https://api.github.com/users/jamescarr/repos","events_url":"https://api.github.com/users/jamescarr/events{/privacy}","received_events_url":"https://api.github.com/users/jamescarr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-14T04:35:16Z","updated_at":"2016-04-08T06:46:38Z","closed_at":"2016-04-08T06:46:38Z","body":"Great tool. I just need some help understanding the logic behind cache warming as described in https://github.com/facebook/mcrouter/wiki/Cold-cache-warm-up-setup. \r\n\r\nSay I have this scenario. I have a cluster of 2 caches and I want to upsize the cluster to 4 nodes. I can't just add 4 more caches to the route because that would skew consistent hashing and result in possibly lots of misses. \r\n\r\nSo I'm surmising that I'll need to change the original cache route with 2 nodes to warm and add a cold cache route that has the 4 new instances I want to swap to. It seems then that gets would be attempted on the new cold pool and backfilled as needed until eventually all gets go against the new cache pool. At that point would I just go back to the original route with the 4 new nodes?\r\n\r\n### Example\r\n\r\nSo say I have this configuration:\r\n\r\n```json\r\n {\r\n   \"pools\": {\r\n     \"main\": { \"servers\": [ \"cache1\", \"cache2\"] }\r\n   },\r\n   \"route\": \"PoolRoute|main\"\r\n }\r\n\r\n```\r\n\r\nAnd I want to expand this to 4 so I change the configuration to the following:\r\n\r\n```json\r\n {\r\n   \"pools\": {\r\n     \"cold\": { \"servers\": [ \"cache3\", \"cache4\", \"cache5\", \"cache6\"] },\r\n     \"main\": { \"servers\": [ \"cache1\", \"cache2\" ] }\r\n   },\r\n   \"route\": {\r\n     \"type\": \"WarmUpRoute\",\r\n     \"cold\": \"PoolRoute|cold\",\r\n     \"warm\": \"PoolRoute|main\"\r\n   }\r\n }\r\n\r\n```\r\n\r\nSo at this point, all gets should have zero misses on the client side and the cold route gets backfilled with sharding happening against the 4 new nodes, correct? Any misses on the cold route will get from the main route and backfill the cold route. \r\n\r\nSo eventually on a long enough timeline we could inspect the 4 cache nodes and decide that it's good enough and change configuration to:\r\n\r\n```json\r\n {\r\n   \"pools\": {\r\n     \"main\": { \"servers\":  [ \"cache3\", \"cache4\", \"cache5\", \"cache6\"]  }\r\n   },\r\n   \"route\": \"PoolRoute|main\"\r\n }\r\n```\r\n\r\nAnd everything keeps going without missing a beat, right? "}}