3 ms·
This runs within the database engine? Doesn't that adversely affect scalability?
by intrasight 5y ago
This runs within the database engine? Doesn't that adversely affect scalability?
- a-priori 5y agoOn the contrary, this could scale much better. If the GraphQL server is a separate component, then a GraphQL query needs to do its own query planning, then the resolvers turn that into SQL queries to the database, then the database does its own query planning and execution for each query. Since one GraphQL query will often turn into multiple SQL queries, there's likely to be duplicated work on the database side across those queries since they relate to the same data. By integrating the GraphQL server into the DBMS, it can do query planning once for the whole GraphQL query, which means that it can reuse parts of the plan and prevent duplicated work and N+1 queries. Either way it's going to have to query the database to get all the data, so the essential work is the same. But this way you have opportunities to reduce wasted work to process the whole GraphQL query.
- syastrov 5y agoMost likely the actual work done by this extension is little compared to the actual work required to perform the queries…but… If you want to scale horizontally you can run multiple read replicas with something which distributes connections evenly to the replicas.