fedspendingtransparency / usaspending-api

Server application to serve U.S. federal spending data via a RESTful API
https://www.usaspending.gov
Creative Commons Zero v1.0 Universal
309 stars 112 forks source link

[DEV-11345] Don't use the DB writer instance for reading [hotfix] [staging] #4152

Closed aguest-kc closed 3 months ago

aguest-kc commented 3 months ago

Description: Previously, we were randomly choosing between our DB writer instance and the read replicas when choosing a database to use for read operations. This sets the read replicas as the only options for read operations to reduce unnecessary load on the writer instance.

Technical details:

Requirements for PR merge:

  1. [x] Unit & integration tests updated
  2. [x] Necessary PR reviewers:
    • [x] Backend
  3. [x] Data validation completed
  4. [x] Jira Ticket DEV-11345:
    • [x] Link to this Pull-Request
    • [x] Performance evaluation of affected (API | Script | Download)
    • [x] Before / After data comparison

Area for explaining above N/A when needed:

2. API documentation updated
No API documentation is affected by this change.

4. Matview impact assessment completed
No matviews are affected by this change.

5. Frontend impact assessment completed
The frontend is not affected by this change.

7. Appropriate Operations ticket(s) created
No operations tickets are needed for this change.