Your task is to write a router that takes into account multiple metrics and returns the best route for a given request.
- The script should be written in a language you're comfortable with. There are two starter examples in Go and Python, but you can use any language you want.
The setup is created using Docker and Docker Compose. You will need to have Docker and Docker Compose installed on your machine.
To run the setup use docker compose up --build
. You can the use curl http://0.0.0.0:8880
or curl http://0.0.0.0:8881
to test the setup.
Your completed task should include the following:
- The script file.
- A README.md file that includes the following:
- Instructions on how to run the script.
- Any necessary setup instructions, such as environment variables or dependencies that need to be installed.
- An explanation of how the script works.
Your task will be evaluated on the following criteria:
- Correctness: Does the script perform a regular backup as specified?
- Error Handling: Does the script appropriately handle and log errors?
- Code Quality: Is the code well-organized, easy to read, and appropriately commented?
- Documentation: Is the README.md file clear and does it explain how to set up and run the script, and does it explain how the script works?
- Edge Cases: Are there any edge cases, or optimisations we should keep in mind when the volume of data increases?
- Please remember that this is not just about getting the script to work. We're interested in your problem-solving process and your approach to writing code and documentation.
Good luck!