Expense Management System

Distributed Systems Application

Fault Tolerant Web Application

Abstract

A fault-tolerant employee expense management system with a TCP proxy-server. The proxy-server supports dynamic load-balancing of incoming requests, dynamic registration of new back-end instances and delisting of crashed back-end instances.

Dynamic Replica Registration: A component called Router is implemented based on this tiny Python TCP proxy server. As part of the node registration, whenever a new expense management application's Docker instance is launched, it will auto-register to the own instance to the router.

Dynamic Load Balancing: The input requests to the router are distributed equally among the running instaces through Round-Robin Algorithm.

Failure Detection (via CircutBreaker): Whenever a node reaches its CircuitBreaker's error count, the router will deregister the failed node from the routing table in Redis and forward the same request to the next available node.

Data Persistence Database: Stored data generated from the APIs into MySQL RDBMS using Flask-SQLAlchemy.

Docker Container Persistence: Docker provides Data containers for stateful applications like Database. Mounted a dedicated volume for MySQL so that you can easily manage the persistence data file generated from MySQL.


Stack: Python Flask, SQLAlchemy, REST, Docker, Redis


Find more on GitHub