A
A
Alastor2015-11-16 20:54:21
Gearman
Alastor, 2015-11-16 20:54:21

Gearman to multiple servers?

There are 3 servers at different addresses.
How to put tasks on another server? Here I opened the port of German outside and the server is stupidly open and you set any task without a password?
I can't get the logic behind it. all examples and documentation work with localhost

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
matperez, 2015-11-16
@Alastor

Basically something like this in php:

$client = new GearmanClient ();
$client->addServer ('192.168.1.200');
$client->addServer ('192.168.1.201');

But here they write
If you supply more than one server, it will always take the last server, unless it is unavailable. This is the way gearman works (and it is generally not a bad idea).
If you want to spread the jobs over multiple servers, you might want to shuffle the list of servers.

So only one will work. It is not possible to specify a specific server to send a task to.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question