Giter Site home page Giter Site logo

sdc-qa's Introduction

System Design Capstone

Backend for Questions and Answers API

Goal

Support an existing retail web application with a modernized system able to withstand the web scale traffic loads.

Development Process

  1. Research and choose the most suitable database for storing questions and answers datasets: PostgreSQL
  2. Design ETL process and seed 15 million+ data into PostgreSQL databse
  3. Design and optimize read/write queries to interact with database
  4. Deploy server and database on AWS EC2
  5. Repeat stress test in production and optimize the system

Optimizations made to solve database and server bottlenecks

  • Create B-tree indexes on tables in PostgreSQL database
  • Apply NGINX load balancer to achieve horizontal scaling with 6 AWS EC2 servers (load-balancing method: least-connected)
  • Enable node caching to improve server performance

Outcome

Achieved 3000 RPS under 20ms latency by load balancing 6 server instances with node caching

Tech Stack

  • PostgreSQL
  • Node.js
  • Express.js
  • node-cache
  • AWS EC2
  • NGINX
  • Loader.io
  • Frisby

Installation and Setup

To download a copy of this project to your local machine:

$ git clone repo_url

Runs the app in the development mode.

$ npm install

Set up a .env file with the following

  • DB_PORT
  • SERVER_PORT
  • USER
  • PASSWORD
$ npm run start

sdc-qa's People

Contributors

katyfsy avatar haleyjung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.