rds read replica lags #9257
Replies: 3 comments 2 replies
-
@simonphughes |
Beta Was this translation helpful? Give feedback.
-
I ran into a similar issue when adding a read replica, was a solution found? |
Beta Was this translation helpful? Give feedback.
-
@kedarguy
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Not sure whether this is the best place to post this, but I think i have an issue with our platform which is running Hasura Cloud.
We have an RDS PostgreSQL cluster running in AWS cloud with a single writer instance, and a set of read only replicas due to us having a large number of real time subscriptions running for each of our clients. In general our whole platform is running on AWS lambda functions using the serverless framework. Using the Events capability of Hasura we have a number of API calls being made on inserts into tables.
Recently I noticed a strange issue where we are inserting data into a table. The Event is triggering and that is correctly calling the api and I can see the data in the request being passed across correctly. The API call in this case then goes to the database to get the inserted object, and a whole bunch of related data which is needed to process. This is happening 1000s of times a day without issue, yet occasionally we get a failure and the system does not process the insert. Putting in some extra logging I can see that we are calling our Hasura query and its returning no data for the passed in parameters. If I manually run the query with exactly the same parameters it works correctly and returns the data. Its probably working correctly 99.99% of the time, but with such high volumes these failures are unacceptable.
The only explanation I can come to with this, is the original data is being written to the Writer instance of postgres, the Event is kicked off, and when the Lambda API runs the query against the Reader instance, the data hasn't fully replicated.
Does this sound plausible, and any suggestions for how to resolve this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions