Gearman Server failed over

93 views
Skip to first unread message

sean nguyen

unread,
Apr 3, 2012, 11:41:22 AM4/3/12
to gearman
Hi,

What happens when a gearman server failed? Is there a way to create a
backup server as well?

Thanks,

Sean Nguyen

Hung Nguyen

unread,
Apr 3, 2012, 10:40:03 PM4/3/12
to gea...@googlegroups.com
Hi Sean Nguyen,

For HA purpose, you can use various solution likes Linux HA, heart-beat, wakeamole or similar applications. 
The logic is, one the master server went down, the slave can wake up and take responsibility. 

--
---
Hung. Nguyen Van
Website: http://ethicconsultant.com


tham nguyen

unread,
Apr 4, 2012, 6:49:17 AM4/4/12
to gea...@googlegroups.com
2 bác cũng là cao thủ gearman hả? em mới dùng gearman, hi vọng được làm quen với 2 bác

2012/4/4 Hung Nguyen <it.bi....@gmail.com>

Anıl Yeni

unread,
Apr 4, 2012, 4:52:53 AM4/4/12
to gea...@googlegroups.com
Hi,
supervisord is another popular tool.

Anil

2012/4/4 Hung Nguyen <it.bi....@gmail.com>

bogdan...@gmail.com

unread,
Apr 4, 2012, 8:12:21 AM4/4/12
to gea...@googlegroups.com
The client you are using should be able to add multiple servers for failover.
Your workers would have to register to all the servers also.

Supervisord is a process monitoring/controlling tool, it is used to manage workers, not for the server.

Brian Aker

unread,
Apr 9, 2012, 4:25:14 AM4/9/12
to gea...@googlegroups.com
Hi,

On Apr 3, 2012, at 8:41 AM, sean nguyen wrote:

> What happens when a gearman server failed? Is there a way to create a
> backup server as well?

If you are looking for HA, run two servers, and have all clients speak to both of them.

Cheers,
-Brian

signature.asc

auror

unread,
Apr 12, 2012, 10:57:49 PM4/12/12
to gea...@googlegroups.com
Hello guys,
Would u like to tell me how to specify the worker to run the job? My
environment like this:
Gearmand just as a server, and two workers( one called wrk1 which
running on 192.168.1.11,another called wrk2 running on 192.168.1.12) have
the same function called job. I want to do the job on the 192.168.1.11 at
sometimes or do the job at together.
My source code as bellow:
gearman_client_st *client= gearman_client_create(NULL);
gearman_return_t ret= gearman_client_add_server(client, "localhost",
4730);
void *value= gearman_client_do(client, task_name, "unique_value",
task_para,
strlen(task_para),

&result_size, &rc);

Thanks very much
Auror.cao

Mats Lindh

unread,
Apr 14, 2012, 12:18:12 PM4/14/12
to gea...@googlegroups.com
Hi!


       Would u like to tell me how to specify the worker to run the job? My
environment like this:

You won't be able to specify which worker should run a task in a queue, but you can implement it by registering different function names for each worker. To run as task on just one worker, add the task with a particular worker name in the function name, such as function_name_wrk1 and function_name_wrk2.

Broadcast (run the job on both wrk1 and wrk2) isn't available in Gearman either. You can however add several jobs, one for each function_name_<workername>, as long as you know the different worker names ahead of time.
 
--
Mats Lindh, http://e-mats.org/
Reply all
Reply to author
Forward
0 new messages