/plushcap/analysis/hasura/architecture-of-a-high-performance-graphql-to-sql-server-58d9944b8a87

Architecture of a high performance GraphQL to SQL engine

What's this blog post about?

The Hasura platform's data microservice provides a HTTP API to query Postgres using GraphQL or JSON in a permission safe way. It is designed for high performance with fast response times, large throughput, and low CPU and memory usage. A GraphQL query goes through stages of session resolution, query parsing, validation, execution, and response generation. The architecture aims to minimize HTTP stack overhead, enable efficient query translation from GraphQL to SQL, generate efficient Postgres compiled SQL queries, and efficiently send back results. Optimizations include batching queries, using joins for data collection, optimizing response generation by pushing transformations into Postgres, and utilizing prepared statements. These enhancements result in significant performance benefits compared to other architectures.

Company
Hasura

Date published
April 19, 2018

Author(s)
Sandip

Word count
1449

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.