-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Labels
Description
Problem
In a setup where:
- There's a master database and several replicas
- The master and the replicas each have their own ECS task with a postgREST instance (which can scale and multiply according to demand, this can reach up to 100 instances connecting to the same db), all of them have a LISTEN channel
- A migration occurs and event trigger for reloading is setup, since master + all the replicas LISTEN channel are connected to the master (ref), the schema cache process for each one is triggered at the same time.
- All the schema cache queries fire at the same time, causing thundering herd -- which makes the schema cache take longer than usual
Proposal
Having a way to read the schema cache from a file and sharing across instances could potentially mitigate this, also discussed before on #2918
Reactions are currently unavailable