Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a24c7f20af8aae97

Jump to content

// Workers AI · dad joke modeWhat did Gearman say when tired? I'm geared out.

From Wikipedia, the free encyclopedia
Gearman
Original authorBrad Fitzpatrick
DevelopersBrian Aker, Eric Day
ReleaseJanuary 8, 2009; 17 years ago (2009-01-08)
Stable release
1.1.22 / August 25, 2025; 11 months ago (2025-08-25)
Written inC, C++, m4, Shell script
Original: Perl
Operating systemLinux, Windows (no server), OpenVMS
Platformx86-64
Available inEnglish
Typeapplication framework
LicenseBSD
Websitegearman.org
Repositorygithub.com/gearman/

Gearman is an application framework designed to distribute appropriate computer tasks to multiple computers, so as to perform large tasks faster, or perform load balancing, or perform a mix of both. For example, a Web server can use Gearman to send tasks for which it is not optimized to another computer (which may be running on a different computer architecture, using another operating system, or loaded with a computer language better suited to a particular operation). It is free and open-source software released with one of the BSD licenses.

It was written originally by Brad Fitzpatrick in Perl. Then Brian Aker and Eric Day rewrote it in C.

How Gearman works

[edit]
The Gearman Application Stack.

Gearman assigns each involved computer a role as client, job server, or worker. A worker machine can be assigned multiple instances of the worker role, which allows more powerful computers to complete more portions of a given task. Tasks originate on a client, are transmitted from the client to the job server, and performed on one or more workers. The completed task's output is then returned, again by way of the job server, to the client where the task originated. Gearman is conceptually related to MapReduce; Gearman handles MapReduce by allowing worker nodes to map out work to other workers, with the original worker acting as the reducer.

Gearman performs coalescence on the work sent by a client. If two or more clients ask for work to be completed on the same body of work, either by seeing that the same blocks are being sent or by using the unique value sent by the client, it will coalesce the work so that only one worker is used. It does this specifically to avoid thundering herd problems which are common to cache hit failures.

To mitigate the damage that would be done if a job server (or its network connection) were to fail, clients can be configured with more than one assigned job server; if the first assigned job server fails, another can be transparently substituted.

Gearman implements a protocol that consists of binary packets containing requests and responses; this protocol defines the structure of messages passing between the three parts of a Gearman implementation. By default, the Gearman protocol uses TCP port 4730. It previously operated on port 7003, but this conflicted with the AFS port range and the new port (4730) was assigned by IANA.

The name "Gearman" was chosen as an anagram for "Manager", "since it dispatches jobs to be done, but does not do anything useful itself."[1]

Features

[edit]

Implementations

[edit]

Clients

[edit]

As of 2025, client libraries exist for C, Perl, Node.js, Python, PHP, Ruby, Java, .NET, JMS, MySQL, PostgreSQL, and Drizzle.[2]

[edit]

Citations

[edit]
  1. "Gearman [Gearman Job Server]".
  2. Gearman page Client & Worker APIs