Commit dbf58421 by Jillian Vogel

Replaces EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE with EDXAPP_MONGO_READ_PREFERENCE

to indicate that this is the default read_preference for all mongo
replicasets.

Adds EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE, so it can differ from
the EDXAPP_MONGO_READ_PREFERENCE and default to PRIMARY.

Updates the CHANGELOG to indicate the variable changes, and to better
clarify their purpose and usage.
parent da73d62e
......@@ -9,16 +9,18 @@
your configuration to set `EDXAPP_CELERY_BROKER_TRANSPORT` explicitly.
- Role: edxapp
- Added `EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE` with a default value of
SECONDARY_PREFERED to distribute read workload across the replica set.
- Changed `EDXAPP_MONGO_HOSTS` to be a comma seperated string, which is
required by pymongo.MongoReplicaSetClient for multiple hosts instead of an
array.
- Added `EDXAPP_MONGO_REPLICA_SET`, which is required to use
pymongo.MongoReplicaSetClient in PyMongo 2.9.1, whis is required to use the
read_preference setting. This should be set to the name of your replica set.
Note that setting `EDXAPP_MONGO_REPLICA_SET` requires `EDXAPP_MONGO_HOSTS` to be a comma-delimited string listing
the host names, not an array.
pymongo.MongoReplicaSetClient in PyMongo 2.9.1. This should be set to the
name of your replica set. Note that setting `EDXAPP_MONGO_REPLICA_SET`
requires `EDXAPP_MONGO_HOSTS` to be a comma-delimited string listing the
host names, not an array.
- Added `EDXAPP_MONGO_READ_PREFERENCE` with a default value of
SECONDARY_PREFERED to distribute read workload across the replica set for
replicated docstores and contentstores.
This setting is ignored if `EDXAPP_MONGO_REPLICA_SET` is not set.
- Added `EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE` with a default value of
PRIMARY to prevent race conditions when reading from the draft replica set.
This setting is ignored if `EDXAPP_MONGO_REPLICA_SET` is not set.
- Role: nginx
- Modified `lms.j2` , `cms.j2` , `credentials.j2` , `edx_notes_api.j2` and `insights.j2` to enable HTTP Strict Transport Security
......
......@@ -74,10 +74,11 @@ EDXAPP_MONGO_USER: 'edxapp'
EDXAPP_MONGO_DB_NAME: 'edxapp'
EDXAPP_MONGO_USE_SSL: False
EDXAPP_MONGO_REPLICA_SET: ''
EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE: 'SECONDARY_PREFERRED'
EDXAPP_MONGO_READ_PREFERENCE: 'SECONDARY_PREFERRED'
EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE: 'PRIMARY'
EDXAPP_MONGO_ADDITIONAL_OPTIONS: &edxapp_mongo_additional_options
replicaSet: "{{ EDXAPP_MONGO_REPLICA_SET }}"
read_preference: "{{ EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE }}"
read_preference: "{{ EDXAPP_MONGO_READ_PREFERENCE }}"
EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS:
default: *edxapp_mongo_additional_options
trashcan: *edxapp_mongo_additional_options
......@@ -873,6 +874,7 @@ edxapp_generic_doc_store_config: &edxapp_generic_default_docstore
EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG:
<<: *edxapp_generic_default_docstore
read_preference: "{{ EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE }}"
EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG:
<<: *edxapp_generic_default_docstore
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment