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

load balancer does not work as expected #12

Closed
pprun opened this issue May 6, 2014 · 1 comment
Closed

load balancer does not work as expected #12

pprun opened this issue May 6, 2014 · 1 comment

Comments

@pprun
Copy link

pprun commented May 6, 2014

I have test code for the load balance, but only the first instance got the load:

public static void main(String[] args) {
Config config = new Config();
//config.setConnectionPoolSize(100); // default 100
// Redisson will use load balance connections between listed servers
String[] redisInstances = new String[]{"192.168.9.101:6379", "192.168.9.102:6379"};
config.addAddress(redisInstances);

    Redisson redisson = Redisson.create(config);
    Queue<Integer> q = redisson.getQueue("QUEUE");

    for (int i = 0; i < 1_000_000; i++) {
        q.add(i);
        if (i % 10000 == 0) {
            System.out.println("put: " + i);
        }
    }

    System.out.println("DONE.");
    redisson.shutdown();
}

Do I miss any thing?

@mrniko
Copy link
Member

mrniko commented Jun 8, 2014

@pprun Fixed in this issue #24

@mrniko mrniko closed this as completed Jun 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants