Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Turbocharging scalability of GraphQL services w...

AMEY BANARSE
February 21, 2020

Turbocharging scalability of GraphQL services with a Distributed SQL DB

GraphQL, with its roots in some of the biggest internet companies like Facebook, was created to simplify cloud-native application development without compromising performance or security. However, the ability to scale out on-demand, the need for high availability and tolerating cloud outages are omnipresent in cloud-native architectures. Hasura is a popular, open-source GraphQL engine that works on top of a PostgreSQL database to instantly give you a production-ready GraphQL API. However, vanilla PostgreSQL is not horizontally scalable or highly available. YugabyteDB, an open-source, distributed SQL database was built to support all PostgreSQL features with full wire-compatibility to address exactly these needs - massive scalability, high availability and geo-distribution of data. In this talk, we will look at what features are needed in a distributed SQL database to support a GraphQL engine like Hasura. We will also look at the open-source distributed SQL DB landscape, and how YugabyteDB has been optimized for scaling the Hasura GraphQL engine.

AMEY BANARSE

February 21, 2020
Tweet

More Decks by AMEY BANARSE

Other Decks in Technology

Transcript

  1. 2 © 2019 All rights reserved. Introduction 2  Amey

    Banarse Principal Data Architect, Yugabyte Inc. ♦ Pivotal ♦ FINRA ♦ NYSE University of Pennsylvania (UPenn) @ameybanarse about.me/amey
  2. 4 Yugabyte Confidential © 2020 All rights reserved. A brief

    history of Yugabyte Builders of multiple popular DBs Part of Facebook’s Cloud-Native DB Evolution Yugabyte team dealt with this growth first hand Massive geo-distributed deployment given global users Worked with world class infra team to solve these issues Yugabyte founding team ran Facebook’s public-cloud scale DBaaS +1 Trillion ops/day +100 Petabytes data set sizes
  3. 5 Yugabyte Confidential © 2020 All rights reserved. What is

    Distributed SQL? SQL & Transactions SQL Massive Scalability Geo Distribution Ultra Resilience A Revolutionary Database Architecture
  4. 6 Yugabyte Confidential © 2020 All rights reserved. Open source,

    high performance, cloud native, distributed SQL database 100% Apache 2.0 Low Latency (Sub-ms) Kubernetes & Multi-Cloud
  5. 7 Yugabyte Confidential © 2020 All rights reserved. Designing the

    Perfect Distributed SQL DB PostgreSQL more popular than MongoDB Aurora much more popular than Spanner bit.ly/distributed-sql-deconstructed Amazon Aurora Google Spanner A highly available MySQL and PostgreSQL-compatible relational database service Not scalable but HA All RDBMS features PostgreSQL & MySQL The first horizontally scalable, strongly consistent, relational database service Scalable and HA Missing RDBMS features New SQL syntax
  6. 8 Yugabyte Confidential © 2020 All rights reserved. o YSQL

    - Fully relational SQL API that is wire compatible with PostgreSQL o YCQL - Optimized Cassandra Query Language API o DocDB – High-performance distributed Document store – Offers strong consistency and multi row ACID transactions Design Follows a Layered Approach
  7. 10 © 2019 All rights reserved. All Nodes are Identical

    … … YugabyteDB Query Layer YugabyteDB Query Layer YugabyteDB Query Layer DocDB Storage Layer DocDB Storage Layer DocDB Storage Layer Can connect to ANY node Add/remove nodes anytime YugabyteDB Node YugabyteDB Node YugabyteDB Node HASURA
  8. 14 Yugabyte Confidential © 2020 All rights reserved. Building Geo-Distributed

    GraphQL services • Scalable & Highly Available data tier • Business Continuity • Geo-Partitioning & Data Compliance
  9. 15 © 2018 All rights reserved. Scaling Without Load Balancers

    Yugabyte Cluster Awareness for Hasura GraphQL Load Balancers Hasura Hasura Hasura Connection Pool Hasura r YugabyteDB Cluster
  10. Scalable, Distributed GraphQL Subscriptions • Integrates with YugabyteDB Change Data

    Capture (CDC) • Use Cases ◦ Fraud Detection ◦ Real Time Dashboards ◦ Event Driven architectures Distributed DB Log Search Index Kakfa Streams GraphQL subscriptions Realtime Push notifications
  11. 17 © 2019 All rights reserved. Join the community yugabyte.com/slack

    We stars! github.com/yugabyte/yugabyte-db We’re Hiring! bit.ly/yugabyte-careers