hasura / hasura/graphql-engine

Request rate to remote schema through hasura engine is very slow

Open
#6,807 2 comments 1 reaction 1 assignee Claimed by @eviefp View on GitHub
a/performance
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

## Bug description

I try to benchmark our server in production environment. I use autocannon for that purpose.
**Case 1**: I will benchmark hasura engine (requests will be sent to hasura engine which will forward theme to remote schema: our API server).
**Case 2**: I will send directly requests to the API server.
The result is very surprised. The request rate in case 1 is hundred times lower than case 2.
I test again in local environment, the result does not change.
As you can see, the latency in case 1 is higher than case 2.

**Case 1:**

![Imgur](https://i.imgur.com/uSjPZ5M.png)

**Case 2:**

![Imgur](https://i.imgur.com/pwrRt4M.png)

## How to reproduce
I just create a repository to reproduce this issue:
https://github.com/bkstorm/hasura-engine-benchmark

## Expected behavior
I hope the request rate in two cases are similar.

## Hasura information

## Environment & setup

- OS: Mac OS
- Database: PostgreSQL
- Node.js version: v12.22.1
- Hasura version: v1.3.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.