Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsegismont/graphql-server-benchmark
Benchmark of a simple GraphQL server on popular spec implementations
https://github.com/tsegismont/graphql-server-benchmark
benchmark graphql graphql-server
Last synced: about 2 months ago
JSON representation
Benchmark of a simple GraphQL server on popular spec implementations
- Host: GitHub
- URL: https://github.com/tsegismont/graphql-server-benchmark
- Owner: tsegismont
- License: apache-2.0
- Created: 2019-05-22T14:40:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-05T22:22:49.000Z (about 1 year ago)
- Last Synced: 2024-10-20T08:58:20.825Z (2 months ago)
- Topics: benchmark, graphql, graphql-server
- Language: Java
- Homepage:
- Size: 211 KB
- Stars: 14
- Watchers: 6
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= GraphQL server benchmark
Benchmark of a simple https://graphql.org/[GraphQL] server on popular spec implementations.
== Lastest results
link:results/round1/results.adoc[Round 1]
== The benchmark
The benchmark consists in a simple blogging GraphQL server:
* fetching json (author profiles) from a remote HTTP server
* reading rows (posts and comments) from a Postgres databaseimage::graphql-server-benchmark.svg[GraphQL Server Banchmark]
[source]
.Schema file
----
type Post {
author: Author!
title: String!
content: String!
comments: [Comment!]
}type Comment {
author: Author!
post: Post!
content: String!
}type Author {
firstName: String!
lastName: String!
bio: String!
posts: [Post!]
comments: [Comment!]
}type Query {
posts: [Post!]
author(id: Int!): Author
}
----The backend HTTP service is setup with 10 authors.
The Postgres database is setup with:
* 2 posts per author
* 2 comments per post:
** 1 comment from another author
** 1 comment (reply) from the post authorEach framework is tested with different link:queries.adoc[queries].
== Guidelines
The server must:
* accept the `BACKEND_HOST` environment variable for configuration
* accept the `POSTGRES_HOST` environment variable for configurationThe server may:
* cache author profiles per-query
* use HTTP and Postgres pipeliningThe server must not:
* cache all posts and comments
* cache all author profiles== Test environment
* 3 quad-core servers Intel Xeon e5-2637v3 128G RAM (injector, server, backend)
* 1 quad-core server Intel Xeon e5-2637v3 256G RAM (postgres)
* 10 GbE switch== Contributing
You can add an implementation in the link:implementations/[implementations] directory.
Make sure the name describes the software stack.
For example, _Java/vertx-graphql-java_ means the implementation:* is written in the Java language
* uses Vert.x as the web server
* uses GraphQL-Java engineEach implementation must provide:
* a `Dockerfile` (build and run)
* a `set-env.sh` file that defines the `FRAMEWORK_NAME` implementation (must be unique across implementations)For testing purposes, you can build and run with Docker:
* the link:backend/[backend] server
* the link:postgres/[postgres] database== License
link:LICENSE[Apache 2.0 License]