4.5.2 Multi-master mode
Normally buildbot operates using a single master process that uses the
configured database to save state.
It is possible to configure buildbot to have multiple master processes that
share state in the same database. This has been well tested using a MySQL
database. There are several benefits of Multi-master mode:
- You can have large numbers of build slaves handling the same queue of
build requests. There is a finite limit to the number of slaves you
can attach to a single master process. By adding another master
which shares the queue of build requests, you can attach more slaves
to this additional master, and increase your build throughput.
- You can shut one master down to do maintenance, and other masters
will continue to do builds.
State that is shared in the database includes:
- List of changes
- Scheduler names and internal state
- Build requests, including the builder name
Because of this shared state, you are strongly encouraged to:
- Ensure that change branches correspond to exactly the schedulers you
have configured on those branches. All schedulers on all masters
will see all new changes, regardless of which master initially
submitted the change.
- Ensure scheduler names are unique, and only run one instance of a
scheduler for each set of masters connecting to one database.
- Ensure builder names are unique for a given build factory implementation.
You can have the same builder name configured on many masters, but if the
build factories differ, you will get different results depending on which
master claims the build.
One suggested configuration is to have one buildbot master configured with
just the scheduler and change sources; and then other masters configured
with just the builders.
To enable multi-master mode in this configuration, you will need to set the
multiMaster option so that buildbot doesn't warn about missing
schedulers or builders. You will also need to set
to the masters with only builders check the database for new build requests
at the configured interval.
# Enable multiMaster mode; disables warnings about unknown builders and
c['multiMaster'] = True
# Check for new build requests every 60 seconds
c['db_poll_interval'] = 60