Skip to content

jonathanjewett/Q-and-A-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Q-and-A-API

Questions and Reviews API Rebuild

This project is part of a scalable microservice used to replace a legacy API for a growing e-commerce site due to an increase in traffic. This particular project is for the questions and answers portion of the API, and was deployed using AWS EC2 t2.micro instances.

Built with:

JavaScript NodeJS NPM Express.js Postgres Sequelize Jest AWS Nginx

Other tools:

  • loader.io
  • K6

Notes/Accomplishments

  • Seeded a PostgreSQL database with over 13 million records
  • Locally optimized for 1000 requests per second with 0% error rate using hash indexing
  • Used total of 5 EC2 t2.micro instances:
    • 1 database
    • 1 NGINX Load Balancer
    • 3 API Servers

Test Results

  • Deployed Results
  • Untitled

Next Steps

  • Judging from the rror logs it looks like promises are timing out towards the end during tests after 1000 clients per second, which leads me to believe I need to refactor my API to execute more complex queries and rely less on JavaScript to complete the requests
  • Can use New Relic to double check thats where the bottleneck lies

About

Questions and Reviews API Rebuild

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%