Skip to content

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

Merged

Conversation

gerhard
Copy link
Contributor

@gerhard gerhard commented Sep 19, 2017

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

@gerhard gerhard changed the title Add all log categories to example config mentioned on the configure page WIP: Add all log categories to example config mentioned on the configure page Sep 19, 2017
@gerhard gerhard changed the title WIP: Add all log categories to example config mentioned on the configure page WIP: Sync rabbitmq.config.example with https://www.rabbitmq.com/configure.html Sep 19, 2017
@gerhard gerhard force-pushed the sync-rabbitmq-config-example-with-configure-page branch from 904a177 to a8013ae Compare September 19, 2017 10:01
@gerhard
Copy link
Contributor Author

gerhard commented Sep 19, 2017

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?

@gerhard gerhard force-pushed the sync-rabbitmq-config-example-with-configure-page branch 2 times, most recently from a1a003e to bdb108d Compare September 19, 2017 10:16
gerhard added a commit to rabbitmq/rabbitmq-website that referenced this pull request Sep 19, 2017
@gerhard gerhard force-pushed the sync-rabbitmq-config-example-with-configure-page branch from b5b67ff to bea863b Compare September 19, 2017 15:47
@@ -338,6 +372,26 @@
%%
%% {queue_index_embed_msgs_below, 4096},

%% The credits that a queue process is given by the message store.
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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:

  1. What configs exist?
  2. What do they mean?
  3. 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.

Copy link
Collaborator

@michaelklishin michaelklishin Sep 20, 2017

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.

Copy link
Contributor

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.

@gerhard gerhard changed the title WIP: Sync rabbitmq.config.example with https://www.rabbitmq.com/configure.html WIP: Sync rabbitmq.config.example with PROJECT_ENV Sep 20, 2017
%% 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,
Copy link
Contributor

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.

@gerhard gerhard force-pushed the sync-rabbitmq-config-example-with-configure-page branch from bea863b to 33d2b98 Compare September 20, 2017 16:29
@gerhard gerhard changed the title WIP: Sync rabbitmq.config.example with PROJECT_ENV Sync rabbitmq.config.example with PROJECT_ENV Sep 20, 2017
@gerhard
Copy link
Contributor Author

gerhard commented Sep 20, 2017

This is now ready to review & merge

%% {mirroring_sync_batch_size, 4096},

%% Controls flow control between queue mirrors
%% Be careful with this configuration, it's controversial
Copy link
Collaborator

@michaelklishin michaelklishin Sep 21, 2017

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.

%% {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,
Copy link
Collaborator

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".

%% 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/
Copy link
Collaborator

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).

%% {nodelay, true}]}
%% {tcp_listen_options, [
%% {backlog, 128},
%% {nodelay, true},
Copy link
Collaborator

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.

Copy link
Contributor Author

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?

@@ -572,8 +667,12 @@

%% TCP/Socket options (as per the broker configuration).
%%
%% {tcp_listen_options, [{backlog, 128},
%% {nodelay, true}]}
%% {tcp_listen_options, [
Copy link
Collaborator

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.

%% {background_gc_target_interval, 60000}
%% {background_gc_target_interval, 60000},

%% File size in bytes used for persisting messages
Copy link
Collaborator

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."

%%
%% {disk_monitor_failure_retries, 10},

%% Milliseconds to wait for disk space usage values
Copy link
Collaborator

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.


%% SSL handshake timeout, in milliseconds.
%%
%% {ssl_handshake_timeout, 5000},

%% Whether to allow SSL POODLE attack,
Copy link
Collaborator

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."

@gerhard
Copy link
Contributor Author

gerhard commented Sep 22, 2017

@michaelklishin how about now?

@michaelklishin michaelklishin merged commit 879d183 into stable Sep 22, 2017
@gerhard gerhard deleted the sync-rabbitmq-config-example-with-configure-page branch October 2, 2017 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants