Challenge: Design a system which can store and index a large number of places
Prototype built using:
- Redis - database backend
- Falcon - web framework
- Docker and docker compose - container environment
To get up and running, run:
docker-compose up
The web interface will be availabe at http://localhost:8000
The seed_db_with_random_places.py
script is used to populate redis with random data,
the command to run is:
docker-compose run app python seed_db_with_random_places.py
- High performance throughput
- data oriented as key-value
- Data store size remains relatively constant (slow growth)
- API's radius units are in meters.
- Use a production grade HTTP server such as Nginx infront of Gunicorn
- Disable Transparent Huge Tables for redis - better performance
- Tune redis's fsync settings
- Explore docker networking stack - default setting may not be ideal
Used locust for benchmarking. Results are availabe in the
benchmarks
folder including screenshots.