This is a coding assignment for a backend developer position at Aiven.
The exercise should be relatively fast to complete. You can spend as much time
as you want to. If all this is very routine stuff for you, this should not take
more than a few hours. If there are many new things, a few evenings should
already be enough time.
We select the candidates for the interview based on the homework, so please pay
attention that your solution demonstrates your skills in developing production
quality code.
If you run out of time, please return a partial solution, and describe in your
reply how you would continue having more time.
Please use Python for the exercise, otherwise, you have the freedom to select
suitable tools and libraries (with a few exceptions listed below).
Be prepared to defend your solution in the possible interview later.
To return your homework, store the code and related documentation on GitHub
for easy access. Please send following information via email:
Your code will only be used for the evaluation.
Your task is to implement a system that monitors website availability over the
network, produces metrics about this and passes these events through an Aiven
Kafka instance into an Aiven PostgreSQL database.
For this, you need a Kafka producer which periodically checks the target
websites and sends the check results to a Kafka topic, and a Kafka consumer
storing the data to an Aiven PostgreSQL database. For practical reasons, these
components may run in the same machine (or container or whatever system you
choose), but in production use similar components would run in different
systems.
The website checker should perform the checks periodically and collect the
HTTP response time, error code returned, as well as optionally checking the
returned page contents for a regexp pattern that is expected to be found on the
page.
For the database writer we expect to see a solution that records the check
results into one or more database tables and could handle a reasonable amount
of checks performed over a longer period of time.
Even though this is a small concept program, returned homework should include
tests and proper packaging. If your tests require Kafka and PostgreSQL
services, for simplicity your tests can assume those are already running,
instead of integrating Aiven service creation and deleting.
Aiven is a Database as a Service vendor and the homework requires using our
services. Please register to Aiven at https://console.aiven.io/signup.html at
which point you'll automatically be given $300 worth of credits to play around
with. The credits should be enough for a few hours of use of our services. If
you need more credits to complete your homework, please contact us.
The solution should NOT include using any of the following: