A scalable web application built with Python and Django that allows users to create polls, cast votes, and view live results—designed to handle high traffic efficiently.
To create a robust polling platform that maintains performance and reliability under heavy user load, showcasing scalable backend engineering principles.
- Functional Polling System: Enable poll creation, voting, and real-time result updates with a intuitive interface.
- Scalability: Implement horizontal scaling, caching, and async processing to handle traffic spikes.
- High-Traffic Resilience: Validate performance under simulated loads (e.g., 1,000 users) with metrics like response time and error rate.
- Efficient Architecture: Build a modular, cost-effective system using best practices.
- Robust Backend: Handles thousands of users with minimal performance drop.
- Proof of Scalability: Load testing data showing flat response times and low errors as load increases.
- Real-World Ready: A prototype applicable to high-traffic use cases (e.g., social media, live events).
- Skill Mastery: Deep understanding of scalable web development and testing.
- Backend: Python, Django, Django REST Framework
- Database: PostgreSQL (indexed, replicable)
- Caching & Messaging: Redis (results cache, WebSocket layer)
- Async Processing: Celery (vote handling)
- Real-Time: Django Channels (WebSocket updates)
- Server: Gunicorn (WSGI), Nginx (load balancer/proxy)
- Deployment: Docker (local), AWS ECS (cloud, optional)
- Testing: Locust (load testing)
- Poll Creation: Users create polls with multiple options (
POST /polls/
). - Voting: Async vote processing via API (
POST /votes/
). - Live Results: Real-time updates with WebSockets, cached in Redis (
GET /polls/{id}/results/
). - Scalability: Load-balanced instances, caching, optimized queries.
- Performance: <200ms response time under 1,000 concurrent users.
- Throughput: High requests/sec with no downtime.
- Stability: <1% error rate during sustained load.
- Python 3.9+
- Docker (optional for containerized setup)
- PostgreSQL, Redis
Clone the repo:
git clone https://github.com/devsylva/CrowdTick.git
cd CrowdTick
python -m venv venv
source venv/bin/acitvate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
daphne -b 0.0.0.0 -p 8000 crowdTick.asgi:application
celery -A crowdTick worker -l info
redis-server
Use Locust to simulate high traffic:
locust -f locustfile.py --host=http://localhost:8000