-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Sync rabbitmq.config.example with PROJECT_ENV #1366
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
Sync rabbitmq.config.example with PROJECT_ENV #1366
Conversation
904a177
to
a8013ae
Compare
Once the missing properties are added to rabbitmq.config.example, I was thinking that we should order all config properties alphabetically. It requires the least cognitive overhead, both when adding or looking properties up. What do y'all think? |
a1a003e
to
bdb108d
Compare
b5b67ff
to
bea863b
Compare
docs/rabbitmq.config.example
Outdated
@@ -338,6 +372,26 @@ | |||
%% | |||
%% {queue_index_embed_msgs_below, 4096}, | |||
|
|||
%% The credits that a queue process is given by the message store. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These paragraphs belong to a guide on rabbitmq.com. Comments to configuration keys can be brief descriptions with a link to more detailed docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a good candidate. Might need some rearranging and editing but it tries to cover the same set of settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that contextual information is highly valuable when dealing with configuration properties. I agree that guides are essential for explaining how multiple configuration properties work together, but I strongly believe that we should keep essential details alongside configuration properties, in the config file context, without requiring users to jump out.
When I look at a canonical config example, I'm thinking:
- What configs exist?
- What do they mean?
- Why would I want to change a config?
The Cassandra config file example captures my sentiment well, as does this less-known nginx config.
I would really like to know what others think re the above.
Given the big picture, I will reduce the scope of this PR and just sync PROJECT_ENV with rabbitmq.config.example
. Single lines are in order, especially since I am yet to understand what every configuration property does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gerhard Cassandra's config does not explain what Hinted Handoff is or why it exists in several paragraphs, it says "See http://wiki.apache.org/cassandra/HintedHandoff". A few sentences per key makes sense but config key descriptions should not end up being small guides. There are 2 config examples in master, would you duplicate all those "micro guides"? That's my point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are number of guides already and most of config variables are documented in those guides, so we can keep doing that and add links here.
docs/rabbitmq.config.example
Outdated
%% and then 800 for every 800 messages that it processes. | ||
%% | ||
%% A queue process persists AMQP messages by sending them 1 by 1 to the message store process. | ||
%% If the queue process sent 4000 AMQP messages and the message store process didn't manage to persist 800, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not have to persist messages, just process them. Credit flow ack is sent before message store handles a message, it will take some time to actually persist messages.
…nfig Having discussed with @michaelklishin & @hairyhum, it was agreed that these details belong in http://www.rabbitmq.com/persistence-conf.html
bea863b
to
33d2b98
Compare
Add links instead, as per discussion with @michaelklishin & @hairyhum
This is now ready to review & merge |
This was the last pass, there are no more left in PROJECT_ENV, promise.
docs/rabbitmq.config.example
Outdated
%% {mirroring_sync_batch_size, 4096}, | ||
|
||
%% Controls flow control between queue mirrors | ||
%% Be careful with this configuration, it's controversial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not controversial and disabling it is dangerous (as is not having any flow control) with well known outcomes: masters outpacing mirrors at some point, making them consume more and more RAM.
docs/rabbitmq.config.example
Outdated
%% {hipe_compile, false}, | ||
|
||
%% Number of delegate processes to use for intra-cluster communication. | ||
%% On a machine which has a very large number of cores and is also part of a cluster, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How large is "very large"? I'd say "more than 16 cores and plenty of bandwidth".
docs/rabbitmq.config.example
Outdated
%% Number of credits that a connection, channel or queue are given | ||
%% By default, every connection, channel or queue is given 400 credits, | ||
%% and then 200 for every 200 messages that it processes | ||
%% See https://www.rabbitmq.com/blog/2015/10/06/new-credit-flow-settings-on-rabbitmq-3-5-5/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention that increasing these values may help with throughput but is dangerous (very high values are no different from having any flow control).
docs/rabbitmq.config.example
Outdated
%% {nodelay, true}]} | ||
%% {tcp_listen_options, [ | ||
%% {backlog, 128}, | ||
%% {nodelay, true}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nodelay
is forced by Ranch even if you disable it. I see no reason to do that, by the way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should nodelay
be removed from PROJECT_ENV?
docs/rabbitmq.config.example
Outdated
@@ -572,8 +667,12 @@ | |||
|
|||
%% TCP/Socket options (as per the broker configuration). | |||
%% | |||
%% {tcp_listen_options, [{backlog, 128}, | |||
%% {nodelay, true}]} | |||
%% {tcp_listen_options, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why there is no link to http://www.rabbitmq.com/networking.html here? It's a pretty extensive guide.
docs/rabbitmq.config.example
Outdated
%% {background_gc_target_interval, 60000} | ||
%% {background_gc_target_interval, 60000}, | ||
|
||
%% File size in bytes used for persisting messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change it to "Message store operations are stored in a sequence of files called segments. This controls max size of a segment file. Increasing this value may speed up (sequential) disk writes but will slow down segment GC process. DO NOT CHANGE THIS for existing installations."
docs/rabbitmq.config.example
Outdated
%% | ||
%% {disk_monitor_failure_retries, 10}, | ||
|
||
%% Milliseconds to wait for disk space usage values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interval of time disk monitor waits before retrying, not a query timeout.
docs/rabbitmq.config.example
Outdated
|
||
%% SSL handshake timeout, in milliseconds. | ||
%% | ||
%% {ssl_handshake_timeout, 5000}, | ||
|
||
%% Whether to allow SSL POODLE attack, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it sound like anyone wants to enable an attack.
"Makes RabbitMQ accept SSLv3 client connections by default. DO NOT DO THIS IF YOU CAN HELP IT."
@michaelklishin how about now? |
I want to reconcile the existing discrepancies between rabbitmq.config.example & PROJECT_ENV. I want to review all config properties and make sure that they are all present and accurate in this canonical rabbitmq.config
Let's discuss which changes need to happen where so that rabbitmq.config.example is accurate & in sync with PROJECT_ENV