https://github.com/electroid/serverless-compare
An example comparison of various serverless providers using a simple GraphQL server
https://github.com/electroid/serverless-compare
Last synced: over 1 year ago
JSON representation
An example comparison of various serverless providers using a simple GraphQL server
- Host: GitHub
- URL: https://github.com/electroid/serverless-compare
- Owner: Electroid
- Created: 2020-07-24T22:38:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-24T23:02:54.000Z (almost 6 years ago)
- Last Synced: 2025-03-18T17:14:27.344Z (over 1 year ago)
- Language: JavaScript
- Size: 519 KB
- Stars: 20
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Workers vs. the competitiors
====================
A hello-world GraphQL function deployed on Cloudflare Workers, AWS Lambda, Azure Functions, and Google Cloud Functions.
```js
const { gql, ApolloServer } = require('apollo-server-${platform}')
const typeDefs = gql`
type Query {
hello: String
}
`
const resolvers = {
Query: {
hello: () => 'Hello world!',
},
}
const server = new ApolloServer({
typeDefs,
resolvers,
introspection: true,
})
// Platform-specific handler
// e.g. module.exports.graphql = server.createHandler()
```
Results
=======
Results are collected from each provider's logs, execution times are based on what the platform reports.
Reproduce
=========
1. Run `serverless deploy` (or `wrangler publish` for Cloudflare Workers)
2. Run `artillery run benchmark.yml` to run various benchmarking tests
3. Go to the provider's logging system and export the execution times (this will be different for every platform)
4. Compare the results!