You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Hasura does not validate all of a source's connection strings when adding or editing a source's configuration. A source may have multiple read-replicas specified and Hasura will only check one of the read-replica connection strings at random.
This is because "checking a connection string" actually means "performing database introspection". When Hasura introspects the database, it performs a read only query, which chooses a read-replica at random to run on. This means that if one of your read replica connection strings is incorrect (or if your primary connection string is incorrect) your source update may succeed because the introspection operation executed against a working read-replica connection string and the other connection strings were not looked at.
This results in Hasura queries to that source failing sporadically if the query is issued to a broken connection string.
Describe the solution you'd like
I want the source creation/update only to succeed if all connection strings (primary + all replicas) result in successful database connection. That way, I can be confident that when I create/update my source, all my configuration is correct and that none of my incoming requests will hit a broken connection string and fail.
The text was updated successfully, but these errors were encountered:
daniel-chambers
changed the title
Validate connectivity to all connection strings when add/editing a source
Validate connectivity to all connection strings when adding/editing a source
Jan 28, 2025
Is your proposal related to a problem?
Currently Hasura does not validate all of a source's connection strings when adding or editing a source's configuration. A source may have multiple read-replicas specified and Hasura will only check one of the read-replica connection strings at random.
This is because "checking a connection string" actually means "performing database introspection". When Hasura introspects the database, it performs a read only query, which chooses a read-replica at random to run on. This means that if one of your read replica connection strings is incorrect (or if your primary connection string is incorrect) your source update may succeed because the introspection operation executed against a working read-replica connection string and the other connection strings were not looked at.
This results in Hasura queries to that source failing sporadically if the query is issued to a broken connection string.
Describe the solution you'd like
I want the source creation/update only to succeed if all connection strings (primary + all replicas) result in successful database connection. That way, I can be confident that when I create/update my source, all my configuration is correct and that none of my incoming requests will hit a broken connection string and fail.
The text was updated successfully, but these errors were encountered: