[cups] CUPS and High Availability

Johannes Meixner jsmeix at suse.de
Mon May 23 06:22:31 PDT 2016


Hello,

On May 23 08:52 Joseph Fisher wrote (excerpt):
> Is there a way to fully replicate all PPD files and
> printer configurations from a "master" CUPS server,
> to multiple "slave" CUPS servers, for a true
> High Availability solution?

With traditional CUPS Browsing that was available
in CUPS up to version 1.5.4 there was the so called
"implicit classes" feature, see
http://cups.org/documentation.php/doc-1.5/spec-browsing.html
(excerpt)
--------------------------------------------------------------
A key feature of CUPS printer sharing is support for implicit
classes, which are automatically-created classes for printers
that are shared by multiple servers. These implicit classes
provide automatic load balancing and fail-safe printing
functionality transparently to the user.
--------------------------------------------------------------

With traditional CUPS up to 1.5.4 you could set up
several basically identical "master" CUPS servers and
let all of them announce their print queues via the
traditional CUPS Browsing protocol and on the clients
those multiple same print queue names would be combined
into so called "implicit classes" so that each multiple
available print queue appears on the clients as one
single implicit class and clients print via one of the
several identical "master" CUPS servers.
All what could get lost when one of the "master" servers
crashes are those print jobs on that particular server.

With nowadays CUPS > 1.6 you need the cups-browsed from
the cups-filters software which is separated software
not from CUPS but from from OpenPrinting.org, cf.

http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters

For the cups-browsed "implicitclass" functionality
see the README file of cups-browsed that reads
(excerpts):
-----------------------------------------------------------------
HELPER DAEMON FOR BROWSING REMOTE CUPS PRINTERS
AND IPP NETWORK PRINTERS

>From version 1.6.0 on in CUPS the CUPS broadcasting/browsing
facility was dropped, in favour of Bonjour-based broadcasting of
shared printers.
...
This is a regression compared to the old CUPS
broadcasting/browsing.
...
The solution is cups-browsed, a helper daemon running
in parallel to the CUPS daemon
...
Also high availability with redundant print servers and load
balancing is supported. If there is more than one server providing
a shared print queue with the same name, cups-browsed forms a
cluster locally with this name as queue name and printing through
the "implicitclass" backend. Each job triggers cups-browsed to
check which remote queue is suitable for the job, meaning that it
is enabled, accepts jobs, and is not currently printing.  If none
of the remote queues fulfills these criteria, we check again in 5
seconds, until a printer gets free to accommodate the job. When we
search for a free printer, we do not start at the first in the
list, but always on the one after the last one used (as CUPS also
does with classes), so that all printer get used, even if the
frequency of jobs is low. This is also what CUPS formerly did with
implicit classes. Optionally, jobs can be sent immediately into
the remote queue with the lowest number of waiting jobs, so that
no local queue of waiting jobs is built up.
-----------------------------------------------------------------

I never used the cups-browsed "implicitclass" functionality.

I don't know if there is some kind of high availability
functionality provided directly in nowadays CUPS > 1.6.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)




More information about the cups mailing list