Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help configuring cold cache warm up and replication #382

Open
m8051 opened this issue Oct 4, 2021 · 1 comment
Open

Help configuring cold cache warm up and replication #382

m8051 opened this issue Oct 4, 2021 · 1 comment

Comments

@m8051
Copy link

m8051 commented Oct 4, 2021

Hi all,

We recently had an outage in our datacenter that caused issues to one of our mecached nodes and we would like to add/increase the capacity of our nodes to make the system more resilient.

As far as I understood, the cold cache warm up would do what we need, and I am wondering if anyone has any experience setting mcrouter to achieve cold cache warm up and replication at the same time.

This is what I have been testing in my local environment:

CMD
/usr/bin/mcrouter --num-proxies=2 --log-path=/var/log/mcrouter/mcrouter.log --port=50000 --config-file=/etc/mcrouter/mcrouter.json
MCROUTER.JSON
{
  "pools": {
    "cold": { "servers": [ "10.10.10.245:50002", "10.10.10.245:50003", "10.10.10.245:50004" ] },
    "warm": { "servers": [ "10.10.10.50:50001" ] }
  },
  "route": {
    "type": "OperationSelectorRoute",
      "operation_policies": {
        "add": {
          "type": "AllSyncRoute",
          "children": ["Pool|cold", "Pool|warm"]
        },
        "set": {
          "type": "AllSyncRoute",
           "children": ["Pool|cold", "Pool|warm"]
        },
        "delete": {
          "type": "AllSyncRoute",
          "children": ["Pool|cold", "Pool|warm"]
        },
        "replace": {
          "type": "AllSyncRoute",
          "children": ["Pool|cold", "Pool|warm"]
        },
        "get": {
          "type": "WarmUpRoute",
          "cold": {
            "type": "OperationSelectorRoute",
            "operation_policies": {
              "get": "LatestRoute|Pool|cold",
              "set": "AllSyncRoute|Pool|cold"
            },
            "default_policy": "AllSyncRoute|Pool|cold"
          },
          "warm": "PoolRoute|warm"
        }
      }
  }
}

Thanks in advance.

@Happytreat
Copy link

Hey @m8051, could you explain what the ideal state you want to achieve with this configuration?

On a side note too, here is a past issue that may be relevant to you: #111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants