How To Run A Bookie Operation
Posted : admin On 4/7/2022This document is a guide to deploying, administering, and maintaining BookKeeper. It also discusses best practices and common problems.
This is an overview that gives a short answer to “How does a bookie earn money?” Each of the steps takes effort and finesse. After all, there are good bookies and bad bookies. However, there are rarely poor bookies. Expand your bookie operation into the 21st century with tools from www.AcePerHead.com and connect with more players with less. A need to learn how to run a bookie operation properly. Currently, you are a regular bookmaker, but you want to learn how to be a good bookie. You just feel like starting a bookie business! If you feel identified with any of the previous statements, this article can certainly clarify some of your doubts, and then some. You can also run local bookies for development purposes. To start a bookie in the foreground, use the bookie command of the bookkeeper CLI tool: $ bin/bookkeeper bookie. To start a bookie in the background, use the bookkeeper-daemon.sh script and run start bookie: $ bin/bookkeeper-daemon.sh start bookie. Thus, a bookie can Open a Successful Bookie Operation with only a few thousand dollars. Steps to Starting a Successful Bookie Operation Using the PricePerPlayer.com Sportsbook Pay Per Head Solution. The smart bookie will use the PricePerPayer.com Pay Per Head solution. This is because they are one of the top Pay Per Head provider in the.
Requirements
A typical BookKeeper installation consists of an ensemble of bookies and a ZooKeeper quorum. The exact number of bookies depends on the quorum mode that you choose, desired throughput, and the number of clients using the installation simultaneously.
The minimum number of bookies depends on the type of installation:
- For self-verifying entries you should run at least three bookies. In this mode, clients store a message authentication code along with each entry.
- For generic entries you should run at least four
There is no upper limit on the number of bookies that you can run in a single ensemble.
Performance
To achieve optimal performance, BookKeeper requires each server to have at least two disks. It’s possible to run a bookie with a single disk but performance will be significantly degraded.
How To Run A Bookie Operations
ZooKeeper
There is no constraint on the number of ZooKeeper nodes you can run with BookKeeper. A single machine running ZooKeeper in standalone mode is sufficient for BookKeeper, although for the sake of higher resilience we recommend running ZooKeeper in quorum mode with multiple servers.
Starting and stopping bookies
You can run bookies either in the foreground or in the background, using nohup. You can also run local bookies for development purposes.
To start a bookie in the foreground, use the bookie
command of the bookkeeper
CLI tool:
To start a bookie in the background, use the bookkeeper-daemon.sh
script and run start bookie
:
Local bookies
The instructions above showed you how to run bookies intended for production use. If you’d like to experiment with ensembles of bookies locally, you can use the localbookie
command of the bookkeeper
CLI tool and specify the number of bookies you’d like to run.
This would spin up a local ensemble of 6 bookies:
When you run a local bookie ensemble, all bookies run in a single JVM process.
Configuring bookies
There’s a wide variety of parameters that you can set in the bookie configuration file in bookkeeper-server/conf/bk_server.conf
of your BookKeeper installation. A full listing can be found in Bookie configuration.
Is My Bookie A Scam
Some of the more important parameters to be aware of:
Find A Bookie
Parameter | Description | Default |
---|---|---|
bookiePort | The TCP port that the bookie listens on | 3181 |
zkServers | A comma-separated list of ZooKeeper servers in hostname:port format | localhost:2181 |
journalDirectory | The directory where the log device stores the bookie’s write-ahead log (WAL) | /tmp/bk-txn |
ledgerDirectories | The directories where the ledger device stores the bookie’s ledger entries (as a comma-separated list) | /tmp/bk-data |
Ideally, the directories specified journalDirectory
and ledgerDirectories
should be on difference devices.
Logging
BookKeeper uses slf4j for logging, with log4j bindings enabled by default.
To enable logging for a bookie, create a log4j.properties
file and point the BOOKIE_LOG_CONF
environment variable to the configuration file. Here’s an example:
Upgrading
From time to time you may need to make changes to the filesystem layout of bookies—changes that are incompatible with previous versions of BookKeeper and require that directories used with previous versions are upgraded. If a filesystem upgrade is required when updating BookKeeper, the bookie will fail to start and return an error like this:
BookKeeper provides a utility for upgrading the filesystem. You can perform an upgrade using the upgrade
command of the bookkeeper
CLI tool. When running bookkeeper upgrade
you need to specify one of three flags:
Flag | Action |
---|---|
--upgrade | Performs an upgrade |
--rollback | Performs a rollback to the initial filesystem version |
--finalize | Marks the upgrade as complete |
How To Report A Bookie
Upgrade pattern
A standard upgrade pattern is to run an upgrade…
…then check that everything is working normally, then kill the bookie. If everything is okay, finalize the upgrade…
…and then restart the server:
If something has gone wrong, you can always perform a rollback:
Formatting
You can format bookie metadata in ZooKeeper using the metaformat
command of the BookKeeper shell.
By default, formatting is done in interactive mode, which prompts you to confirm the format operation if old data exists. You can disable confirmation using the -nonInteractive
flag. If old data does exist, the format operation will abort unless you set the -force
flag. Here’s an example:
You can format the local filesystem data on a bookie using the bookieformat
command on each bookie. Here’s an example:
The -force
and -nonInteractive
flags are also available for the bookieformat
command.
AutoRecovery
For a guide to AutoRecovery in BookKeeper, see this doc.
Missing disks or directories
Accidentally replacing disks or removing directories can cause a bookie to fail while trying to read a ledger fragment that, according to the ledger metadata, exists on the bookie. For this reason, when a bookie is started for the first time, its disk configuration is fixed for the lifetime of that bookie. Any change to its disk configuration, such as a crashed disk or an accidental configuration change, will result in the bookie being unable to start. That will throw an error like this:
If the change was the result of an accidental configuration change, the change can be reverted and the bookie can be restarted. However, if the change cannot be reverted, such as is the case when you want to add a new disk or replace a disk, the bookie must be wiped and then all its data re-replicated onto it.
- Increment the
bookiePort
parameter in thebk_server.conf
- Ensure that all directories specified by
journalDirectory
andledgerDirectories
are empty. - Start the bookie.
Run the following command to re-replicate the data:
The ZooKeeper server, old bookie, and new bookie, are all identified by their external IP and
bookiePort
(3181 by default). Here’s an example:See the AutoRecovery documentation for more info on the re-replication process.