DEV Community

Cover image for Designing a robust monitoring tool
Lorraine Moyo
Lorraine Moyo

Posted on

Designing a robust monitoring tool

Core Engineering principles

Observability first
A service must never be silent. I must build in structured logging and health checks so that I know why and when my crawl failed.

Fail-fast & Graceful Recovery
I always assume a resource provider has anti-scraping measures, so I design for failure. The code should be able to handle 429 Too many requests or 403 Forbidden errors by implementing exponential backoff and rotation strategies

Decoupling
Keep the fetcher (network I/O), parser(data extraction) and notifier (external API interaction) logic strictly seperated.

What is the challenge?

Now that I have defined our core engineering principles let me analyse the challenge that I am trying to solve
In order to create a linkedIn post-monitoring tool, I must consider that LinkedIn is a massive, dynamic site. If I simply run a script to GET a url every 10 minutes, I am highly likely to reach a rate limit or get flagged as malicious activity

So how do I address the "Bot Detection" challenge?
Cem Dilmegani from AI Multiple has some useful solutions to the challenge.
The next edition will entail the trade offs

Top comments (0)