Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/attriaayush/fastify-api
Building a blazing fast REST API with Node.js, MongoDB and Fastify
https://github.com/attriaayush/fastify-api
Last synced: about 1 month ago
JSON representation
Building a blazing fast REST API with Node.js, MongoDB and Fastify
- Host: GitHub
- URL: https://github.com/attriaayush/fastify-api
- Owner: attriaayush
- Created: 2018-12-23T17:36:17.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-25T17:29:38.000Z (about 1 year ago)
- Last Synced: 2024-08-02T05:13:44.060Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 285 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-blazingly-fast - fastify-api - Building a blazing fast REST API with Node.js, MongoDB and Fastify (JavaScript)
README
# Fastify-API
Building an application with fastify npm library proof-of-concept that displays:* Speed - API response time
* Documentation - Using Swagger
* Maintable and expandable codebase## Prerequisites
* Node 8.9.11 or above
* NPM
* MongoDB## How to Build
* ```npm install```
* ```npm start```
* Visit the ```http://localhost:4000/documentation/``` on your local machine to explore the APIs.Note: Please ensure to run these commands at the root level of this project.
## Results
Performed load testing with ArtilleryJS, configuration for the test could be found in ```artillery.config.yml``` file
#### Scenario 1
1200 requests without a failure were completed within 60 seconds with the TPS of 20.
```
All virtual users finished
Summary report @ 18:26:42(+0000) 2018-12-23
Scenarios launched: 1200
Scenarios completed: 1200
Requests completed: 1200
RPS sent: 19.86
Request latency:
min: 1.7
max: 40.4
median: 2.1
p95: 3.9
p99: 6.4
Scenario counts:
0: 1200 (100%)
Codes:
200: 1200
```
#### Scenario 2
3600 requests without a failure were completed within 60 seconds with the TPS of 60.
```
All virtual users finished
Summary report @ 18:33:59(+0000) 2018-12-23
Scenarios launched: 3600
Scenarios completed: 3600
Requests completed: 3600
RPS sent: 59.53
Request latency:
min: 1.5
max: 65.7
median: 2.2
p95: 4.2
p99: 9.9
Scenario counts:
0: 3600 (100%)
Codes:
200: 3600
```