Git Product home page Git Product logo

Comments (7)

manjuraj avatar manjuraj commented on August 23, 2024

You have to write separate client app, that reads all the keys from existing 8 g redis server and write those keys to a cluster of backend redis server through twemproxy

let me know if this works

from twemproxy.

charsyam avatar charsyam commented on August 23, 2024

hi @highkay , There is a trick.
1] run new redis server
2] and run "slaveof original-ip original-port" on new node
3] run twemproxy
4] run "slaveof no one" on new node

But, this solution is somewhat dangerous.
because one of them fails, It can show old version data which it has.

from twemproxy.

manjuraj avatar manjuraj commented on August 23, 2024

@charsyam I like your idea

from twemproxy.

highkay avatar highkay commented on August 23, 2024

hi @charsyam If I am not misunderstand your idea, after 1,2 and 4, it made a full copy of my original node on the new node, while the two full copies are not rehashed at all!

from twemproxy.

charsyam avatar charsyam commented on August 23, 2024

@highkay hi. so I said it is a kind of trick.

first of all, twemproxy will hash your keys to distribute your queries.

so if you make a full copy of your original node.

It looks like rehashed two nodes.

It is because twemproxy will distribute your queries to 2 nodes.

from twemproxy.

highkay avatar highkay commented on August 23, 2024

hi @manjuraj I am sure the twemproxy would be convenience to run on a fresh redis cluster, but in my situation, it seems I would have to write my resharding programme. I wonder if there could be a solution like https://github.com/kni/redis-sharding-hs.

from twemproxy.

highkay avatar highkay commented on August 23, 2024

@charsyam First of all, I am sorry for maybe I am not clear my situation. Now we are not using twemproxy, only direct redis connections in our code. So the keys on the original node are not hashed at all. If I made the slave fresh new node fully copy the keys/data, it helped nothing.

from twemproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.