Skip to content
♨️ A scalable StackOverflow clone.
TypeScript JavaScript CSS Other
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
deployment feat(kibana.txt): Added queries used in Kibana May 18, 2019
scripts 🎉 Init commit! May 12, 2019
su-accounts 🔧 chore: Cleaned up data Sep 5, 2019
su-frontend 🎉 Init commit! May 12, 2019
su-media 🔧 chore(const.ts): Added missing constants file Oct 9, 2019
su-questions Merge branch 'master' of Sep 5, 2019
su-search 🔧 chore: Cleaned up data Sep 5, 2019
su-users 🔧 chore: Cleaned up data Sep 5, 2019
.gitignore 🔧 chore: Cleaned up data Sep 5, 2019 docs( More info May 15, 2019


A scalable StackOverflow clone powered by Koa.


  • This is the gist of what it can do:
    • User account registration with email verification.
    • Posting questions and answers with media.
    • Upvoting/downvoting questions and answers.
    • Search and filtering for questions based on timestamp, query, count, and more.

Built With

  • ⚡️ React - a JavaScript library for building UIs.
  • 💎 Koa - a next generation web framework for Node.js.
  • 🐵 MongoDb - the most popular database for modern apps.
  • 🐜 jwt - compact and secure data transmission for stateful services.
  • 🔍 Elastic Search - scalable open source search.
  • 💂 Kibana - data visualization for Elastic stack.
  • 💰 Redis - in-memory data structure store/cache.
  • 🚀 Nginx - high performance load balancer.
  • 🐰 RabbitMQ - open source message broker.
  • PM2 - Node.js process manager.


  • Was able to handle 1000 users sending a total of 200,000 requests.


  • In general, each instance you deploy would consist of all the microservices that are included in the project, which are the folders prefixed with su- and qu-.
  • The option is to deploy them separately and cluster each microservice by type on each machine. This may reduce CPU load on instances that share both the backend microservices and the queueing.
  • What I recommend is doing a mix of machines that take on a couple of microservices and partially specializing the instances.
  • Assuming that you are familiar with Ansible, there are playbooks written to help speed up setting up instances. PM2 is used to deploy and maintain the instances.

App Instances

  • The app will be able to sustain quite a bit of load if all microservices are located on each machine.
    • Some specialization, such as moving the search and questions microservices to separate machines may lower the overhead, since these services are often hit the most.

Database (Mongodb)

  • It is recommended to have a query router for each app instance you have.
  • However, shards and config servers should run by itself in its own instance to avoid performance hits.
  • Deploying 3 shards, 3 config servers and one query router for each app instance should be sufficient.


  • Redis will work best when running by itself on its own instance.
  • Clustering is possible, but performance is slower than a single process based on testing.


  • The ELK stack can run on a single machine. Ensure that there is at least 4GB of RAM so the write queue limit can be raised in Elastic Search to handle more requests.

How it looks/works

Smores Demo Question Page Answer Component Home Page Ask Page Search Page Search Filter


You can’t perform that action at this time.