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.
- Each one of the 100s instances (whether connected to master or replica) fire their schema cache queries 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
Problem
In a setup where:
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