-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question regarding ZkBookieRackAffinityMapping #151
Comments
Yes, this is another area where we need to add more documentation. We use the BookKeeper rack-aware placement policy. The "rack" concept can be anything, (rack/region/availability zone). The base idea is: when forming the ensemble for a new ledger, pick bookies from different racks, to reduce the chances of data unavailability. If bookies from different racks are not available, the policy falls back to chose randomly across available bookies. The You only need to update the If the So, in AWS, you'd probably want to create instances in different AZs and update the
Yes, just make sure you have bookies from different "racks" in the configuration.
You should be able to verify that all ledgers should have the ensemble containing bookies from different AZs :
It's automatically used when |
@merlimat We're getting lots of this messages:
Is this normal? It looks like our topolopgy is not being used. Contents of our znode
|
Looking at a random ledger metadata, we can see the ensemble members are all from different AZs, but we don't know if it's just a coincidence or if the affinity is really working and that WARN is expected. |
* fixing spacing * adding end file newline
### Motivation Currently we don't have tools to manage the rack placement configuration for bookies in a Pulsar cluster. ### Modifications * Added `/admin/v2/bookie` REST handler * Added `admin.bookie()` in Java admin client * Added `pulsar-admin bookies ...` CLI tool * Worked around an issue with bookie hostname and hostname:port that prevented BK client to detect the correct rack. Fixes #151
Hi. I couldn't find any information on the docs on how to tell pulsar to write on different bookies depending on which rack/region/az they are.
Searching the code I found the class ZkBookieRackAffinityMapping, that (correct me if I'm wrong), expects a json with the 'topology' on a znode called /bookie that will use to determine on which bookie write.
So we went ahead and created a little java process that checks the available bookies on /ledgers/available and writes that json, the output is similar to the one I've attached.
My main question here is, are we doing it right ? 😛
And how can we check if it's working?
Should we tell pulsar to use this class ?
Any help will be much appreciated. Thanks
bookie.txt
The text was updated successfully, but these errors were encountered: