Skip to content

feniljain/tyche

Repository files navigation

Tyche

Yet another webhook handler. Built to scale!

🚩 Features

  • Microservice architecture using moleculer framework
  • Docker files to running in Docker containers
  • MongoDB database with moleculer-db and moleculer-db-adapter-mongoose modules
  • NATS transporter
  • Redis cacher
  • RabbitMQ task queue
  • Traefik reverse proxy (in micro arch)
  • Task queue based retry mechanism for webhook failures

🔩 Install

git clone https://github.com/feniljain/tyche.git
cd tyche
npm install
npm start

Architecture

🔧 Development locally

Running MongoDB, Redis and RabbitMQ is required on localhost!

npm run dev

☁️ Start in Docker

🏢 Running as microservices

All services are running in separated containers, communicate via NATS & use Traefik reverse proxy.

docker-compose up -d --build

You can scale up the containers

# Scale up the users service to 2 instances
docker-compose up -d --scale users=2

You can scale up the WWW service as well. Traefik is load balancing the requests to instances.

# Scale up the WWW service to 2 instances
docker-compose up -d --scale www=2

License

This repo is available under the MIT license.