Skip to content

skhaz/high-scalable-voting-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Architecture

This project is a small but highly scalable voting system based on Big Brother Brasil's voting system.

At the front, a load balancer will distribute the load across N instances of the backend container in a production environment.

The backend exposes an API to vote. It just put the unique identifier of the request onto the RabbitMQ queue.

Another process, called worker, will be listening on the same RabbitMQ queue. When a new message arrives, it just increments the key, the UID on Redis.

Everything is horizontally scalable.

Voting

Vote for a person using its UID (unique id), for example UID 1

http localhost:3000/vote uid=1

Get the stats of an UID

http GET localhost:3000/stats/1

Reset all counters

http POST localhost:3000/reset

All examples are using HTTPie.

What is missing?

Kubernetes. I will update this repo soon with it.

Diagram

diagram

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published