Coder Social home page Coder Social logo

gateways-benchmark's Introduction

GraphQL Gateways Benchmark

This repository is a collection is different scenarios and tests performed on different implementations of GraphQL gateways.

This goals of this repo:

  1. Provide a transparent, accurate and descriptive benchmark testing for different tools:

    ➡️ All tests are running in Docker containers, with the same configuration.

    ➡️ During the test, tools like cadvisor are monitoring stats.

    ➡️ Promethues and Grafana are stores results and stats for every run, and we export and embed it as PNG.

    ➡️ Every scenario have a different report, based on what it measures.

    ➡️ We are using a dedicated GitHub Actions runners, with concurrency=1 to make sure tests are running as standalone.

  2. Always be up to date:

    ➡️ This allows tools to improve over time.

    ➡️ All code in the repository is open and can be changed by the community.

    ➡️ Scenarios are executed for every PR, and reports are generated automatically per scenario.

    ➡️ Renovate keeps all dependencies up-to-date.

  3. Various scenarios

    ➡️ We are trying to create real-life scenarios based on our experience and our customers.

    ➡️ Each scenario has differnt setup and measure different stats.

Scenarios

fed-v1-constant-vus-over-time

Latest Results

This scenario runs the following:

  1. 4 GraphQL subgraphs in dedicated services
  2. A GraphQL gateway compatible with the Apollo Federation v1 spec
  3. Constant rate of VUs over fixed time span

This measures the following:

  1. RPS (requests per second) rate
  2. Request duration (average, p95)
  3. Request failures (count)
  4. CPU usage during the entire execution
  5. RAM usage during the entire execution
  6. HTTP layer timings

This scenario uses Federation v1 spec with all gateways that supports this kind of specification (not all gateways supports v2 spec).

fed-v1-constant-vus-subgraphs-delay

Latest Results

This scenario runs the same flow as fed-v1-constant-vus-over-time but with an intentional delay on each upstream Subgraph. This creates more stress and increases memory in the server due to the more inflight requests.

fed-v1-constant-vus-subgraphs-delay-resources

Latest Results

This scenario runs the same flow as fed-v1-constant-vus-subgraphs-delay but with more resources (CPU and RAM) allocated for the gateway.

fed-v1-ramping-vus

Latest Results

This scenario runs the following:

  1. 4 GraphQL subgraphs in dedicated services
  2. A GraphQL gateway compatible with the Apollo Federation spec
  3. Gradually ramping VUs to a high number, to demo a stress scenario

This measures the following:

  1. RPS (requests per second) rate
  2. Request duration (average, med, max, p95)
  3. Request failures (count)
  4. CPU usage during the entire execution
  5. RAM usage during the entire execution
  6. HTTP layer timings

This scenario uses Federation v1 spec with all gateways that supports this kind of specification (not all gateways supports v2 spec).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.