Commit c164d288 by Jillian Vogel

Defaults CMS and LMS draft docstore read_preference to `PRIMARY`,

and the LMS split docstore read_preference to `SECONDARY_PREFERRED`.
parent dbf58421
......@@ -11,16 +11,19 @@
- Role: edxapp
- Added `EDXAPP_MONGO_REPLICA_SET`, which is required to use
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.
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.
This setting causes the `EDXAPP_*_READ_PREFERENCE` settings below to be used.
- 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.
`SECONDARY_PREFERED` to distribute the read workload across the replica set
for replicated docstores and contentstores.
- Added `EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE` with a default value of
`EDXAPP_MONGO_READ_PREFERENCE`.
- Added `EDXAPP_CMS_DOC_STORE_READ_PREFERENCE` with a default value of `PRIMARY`.
- Added `EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG` with a default value of
`EDXAPP_CMS_DOC_STORE_READ_PREFERENCE`, to enforce consistency between
Studio and the LMS Preview modes.
- Role: nginx
- Modified `lms.j2` , `cms.j2` , `credentials.j2` , `edx_notes_api.j2` and `insights.j2` to enable HTTP Strict Transport Security
......
......@@ -74,8 +74,11 @@ EDXAPP_MONGO_USER: 'edxapp'
EDXAPP_MONGO_DB_NAME: 'edxapp'
EDXAPP_MONGO_USE_SSL: False
EDXAPP_MONGO_REPLICA_SET: ''
# Used iff EDXAPP_MONGO_REPLICA_SET is provided.
EDXAPP_MONGO_READ_PREFERENCE: 'SECONDARY_PREFERRED'
EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE: 'PRIMARY'
EDXAPP_CMS_DOC_STORE_READ_PREFERENCE: 'PRIMARY'
EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE: '{{ EDXAPP_MONGO_READ_PREFERENCE }}'
EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE: '{{ EDXAPP_CMS_DOC_STORE_READ_PREFERENCE }}'
EDXAPP_MONGO_ADDITIONAL_OPTIONS: &edxapp_mongo_additional_options
replicaSet: "{{ EDXAPP_MONGO_REPLICA_SET }}"
read_preference: "{{ EDXAPP_MONGO_READ_PREFERENCE }}"
......@@ -871,16 +874,20 @@ edxapp_generic_doc_store_config: &edxapp_generic_default_docstore
# Not setting waitQueueTimeoutMS and waitQueueMultiple since pymongo defaults to nobody being allowed to wait
<<: *edxapp_mongo_additional_options
EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG:
<<: *edxapp_generic_default_docstore
# We use the CMS read_preference here because the draft docstore's view of
# the modulestore should mirror Studio's, so that instructors can check their
# changes in Preview mode.
read_preference: "{{ EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE }}"
EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG:
<<: *edxapp_generic_default_docstore
read_preference: "{{ EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE }}"
EDXAPP_CMS_DOC_STORE_CONFIG:
<<: *edxapp_generic_default_docstore
read_preference: "{{ EDXAPP_CMS_DOC_STORE_READ_PREFERENCE }}"
edxapp_databases:
# edxapp's edxapp-migrate scripts and the edxapp_migrate play
......
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